29th
NOV

Why can’t I send an email using basic VBscript in an.asp page?

Posted by admin under Programming Design

Erik B asked:


here is the relevent portion of my code:

Dim objMail
Set objMail = CreateObject(CDONTS.NewMail)
ObjMail.Send erikbays@yahoo.com, marketing@republiccapitalgroup.com, Subject, This is the body.
Set objMail = Nothing

it is very basic; straight off of the Microsoft web site in fact. Executing this script does not give me an error. The resulting page displays normally. I just don’t ever get an email. I have checked my bulk bin. My server is running VBScript version 5. Without an error message I can’t figure out what the problem is.

Bulk email related posts:

Reader's Comments

  1. Houston Computer Guru |

    there are a few issues with CDONTS. If you have IIS installed on the same box, you need to setup the virtual smtp in IIS to point to your mail server. Check the mail, badmail folder in your inetpub directory. This may give you clues as to the failure as well.

Leave a Reply

*