Click to See Complete Forum and Search --> : Error in sending mails


mayanksrmcem
10-16-2007, 01:51 AM
hi all,

i have write a code for sending mails,
but there is a problem in mail send.
it shows an error message like that:

The "SendUsing" configuration value is invalid.

i have write my code below,
i have not able to solve this proble.
please help me to solve this.
or send me any code for send mail successfully.

thanx

my code is....

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mayank_yourfriend@yahoo.co.in"
myMail.To="mayank_yourfriend@yahoo.co.in"
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
response.write("mail send")
%>

Terrorke
10-16-2007, 10:36 AM
make sure you set the following properties correct :

myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="your relay Server"
'Server port
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
myMail.Configuration.Fields.Update