Click to See Complete Forum and Search --> : cdo mail objects


alxtech
03-24-2008, 04:39 PM
i am using the following code to send email from an asp page, i am trying to add the CC and ReplyTo fields but they do now show when the email arrives. Please let me know what i am doing wrong:

Set objMail = CreateObject("CDO.Message")
objMail.To = cstr(request.form("sendto"))
objMail.Cc = "email@test.com"
objMail.Subject = cstr(request.form("senderemail"))& " has sent you a link"
objMail.From = "theSender@test.com"
objMail.ReplyTo = "Webmaster@test.com"

objMail.HTMLBody = "<font face=arial size=2>The following link has been forwarded to you by</font> " & cstr(request.form("senderemail")) & "

<a href='" & _
cstr(request.form("url")) & "' target='_blank'>" & cstr(request.form("url")) & "</a></font>" & vbCrlf

yamaharuss
03-25-2008, 07:26 AM
How is the mail arriving? I do not see a send command.

alxtech
03-25-2008, 09:01 AM
this is the other part of my code:

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

objMail.Send
set objMail = nothing

Response.Redirect "sendEmail_confirm.asp"