English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories




To

From

Subject

Body





the code of mail.asp

<% @language=VBscript%>
<%
'Sends an email
Dim mail
Set mail = Server.CreateObject("CDO.Message")
mail.To = Request.Form("To")
mail.From = Request.Form("From")
mail.Subject = Request.Form("Subject")
mail.TextBody = Request.Form("Body")
mail.Send()
Response.Write("Mail Sent!")
'Destroy the mail object!
Set mail = nothing
%>
then i have got the following error when i try to send email.

Error Type:
CDO.Message.1 (0x80040220)
The "SendUsing" configuration value is invalid.
/mail.asp, line 10

so how can i send?

2007-03-15 06:25:31 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

You need to set your configuration values:

'remove the spaces from this schema address (Y!Answers truncates it):
sch = "http:// schemas.microsoft.com/cdo/ configuration/"

Set cdoConfig = CreateObject( "CDO.Configuration" )

With cdoConfig.Fields
.Item(sch & "sendusing") = port_to_use
.Item(sch & "smtpserver") = "mail.server.address"
.update
End With

mail.Configuration = cdoConfig

2007-03-15 06:32:47 · answer #1 · answered by Rex M 6 · 0 0

No, you're able to would desire to deliver common HTML. ASP desires to be processed by employing a server, and your email recipient don't have an IIS server set as much as interpret your code. On appropriate of that, it can be an excellent risk-free practices threat to permit that. what's to end you from writing an ASP website that deletes the data on the recipient's laptop?

2016-12-19 06:05:27 · answer #2 · answered by kosakowski 3 · 0 0

fedest.com, questions and answers