Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic Email using CDO

Status
Not open for further replies.

dave547

Programmer
Oct 26, 2001
5
US
I had a survey on the web that had auto-emailing feature that used the CDO library from an ASP page. Then all of a sudden the code stopped working and gave a page 500 error. I do not know the history of changes to the server since I do not maitain the server, but if I know what the problem is I can have it fixed.

dim mail, mailcon, fld, strHTML
set mail = CreateObject("CDO.Message")
set mailcon = CreateObject("CDO.Configuration")

mailcon.Fields.Item(" = 2
mailcon.Fields.Item(" = "mymailserver"
mailcon.Fields.Item(" = 10
mailcon.Fields.update

set mail.Configuration = mailcon
mail.to = "myName@domain.com"
mail.from = "myName@domain.com"
mail.subject = "Evaluation Questionnaire"
mail.HTMLBody = strHTML
mail.Send

If you comment out mail.send the page works but no email is sent. Otherwise, all I get is a 500 page error.
 
Try it out using Netscape, much better error info that IE.

Also, mail the hostmaster, ask them if they have made any changes. They may have disabled CDONTS after a spamming incident or something.

I know I have crashed a server after an email thingy looped to infinity Oops :p

Steve Davis
hey.you@hahaha.com.au

Me? I can't even spell ASP!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top