ASP - CDO.Message issue sending - TechRepublic
Question
September 7, 2010 at 09:48 AM
mcavin

ASP – CDO.Message issue sending

by mcavin . Updated 15 years, 10 months ago

I am trying to make a ecard sending page that will allow you to make a simple ecard that sends internally via intranet. When it queries the objmail.to command it does not read it to send. Here is the piece of code.

objMail.To = Request.QueryString(“EmailTo”)
objMail.From = Session(“EmailFrom”)
objMail.Subject = “Your E-Card from ” & Request.QueryString(“NameFrom”) & “<" & Request.QueryString("EmailFrom") & ">”
objMail.TextBody = “
objMail.TextBody = objMail.TextBody & “
To: ” & Session(“NameTo”) & ” <" & Session("EmailTo") & ">”
objMail.TextBody = objMail.TextBody & “
Message: ” & Request.QueryString(“Message”)
objMail.TextBody = objMail.TextBody & “
From: ” & Session(“NameFrom”) & ” <" & Session("EmailFrom") & ">”
objMail.Send
if Not objMail.SendMail Then
response.write “Mailing Failed… Error is:

response.write objMail.Response
End if
Set objMail = Nothing
Response.Write “The E-Card has been sent successfully.”

The error I get is:
CDO.Message.1 error ‘8004020c’

At least one recipient is required, but none were found.

/cs/default.asp, line 104

This discussion is locked

All Comments