CDOSYS Sample Script

CDOSYS may be used to send mail pro-grammatically from your classic ASP pages. CDOSYS is the replacement for CDONTS which was deprecated after NT4. CDOSYS is available on all of our web servers. Below is a simple example written in ASP. 
green text = comments
red text = fields that you will need to customize

Dim objCDOSYSCon
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
'Out going SMTP server
objCDOSYSCon.Fields("") = "" 
'SMTP port
objCDOSYSCon.Fields("") = 25 
objCDOSYSCon.Fields("") = 2 
objCDOSYSCon.Fields("") = 60 
Set objCDOSYSMail.Configuration = objCDOSYSCon
'Who the e-mail is from
objCDOSYSMail.From = ""
'Who the e-mail is sent to
objCDOSYSMail.To = "" 
'The subject of the e-mail
objCDOSYSMail.Subject = "Subject goes here" 
'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
objCDOSYSMail.HTMLBody = "email message goes here" 
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing

Add Feedback