Click to See Complete Forum and Search --> : unable to send email from an asp page


shanuragu
04-05-2004, 09:06 AM
Hi all

Here is how I am sending an email
emailmessage is the messagestring.

Set objMail = CreateObject("CDONTS.Newmail")
objMail.From = rsUser("admin_email")
objMail.To = rsUser("email")
objMail.Subject = "On Line Shopping Order Details"
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.Body = emailMessage
objMail.Send
Set objMail = Nothing

I have used the same format to send email message from an asp page from a different machine. But here on the machine where I am running this asp page I am unable to send email. Why?? Is there any SMTP configuration has to to be done / any extra settings ?? plz help

Shanuragu

buntine
04-05-2004, 09:12 AM
Have you got an SMTP set up? Do you have CDONTS installed?

Also, what is the error you are receiving?

regards.

shanuragu
04-06-2004, 01:30 AM
Though I am not very femillier with administration, I know that SMTP services are started & running. How can i check for .
CDONTS are installed are not??
I am not getting any error message, all test email messages are not received.
shanuragu

Bullschmidt
04-19-2004, 02:18 AM
CDO is generally used instead of CDONTS on IIS 5 and after (actually the SMTP service within IIS) which is generally on servers after Win NT4 (although I think CDONTS is generally still supported too).

Here are changes I made to convert CDONTS stuff to be CDO stuff instead:

o Change objCDONTS to be called objCDO (actually this is just a cosmetic change)

o This:
Set objCDONTS = Server.CreateObject("CDONTS.NewMail")

Changed to this instead:
Set objCDO = Server.CreateObject("CDO.Message")

o This:
objCDONTS.Body = strEmailBody

Changed to this instead:
objCDO.TextBody = strEmailBody

o This removed:
' Importance.
' (0=Low, 1=Normal, 2=High)
objCDONTS.Importance = 1