Sending Mail Using Classic ASP on MaxESP

Our MaxESP product provides you with an SMTP server to send mail from your Classic ASP and .NET applications, however, sending mail via CDONTS is not supported because the SMTP server is not local to the web servers, and CDONTS has no ability to send mail via remote servers (or to authenticate).  The solution (for Classic ASP applications) is to use CDOSYS. Here is some sample code to get you started:

Dim ObjSendMail
Set ObjSendMail = CreateObject("CDO.Message")

'Configuration for remote SMTP server

'Network Send    
ObjSendMail.Configuration.Fields.Item ("") = 2

'Name of SMTP server
ObjSendMail.Configuration.Fields.Item ("") =""

'SMTP port
ObjSendMail.Configuration.Fields.Item ("") = 25
'MaxESP SMTP servers require authentication

'Basic Authentication
ObjSendMail.Configuration.Fields.Item ("") = 1

'SMTP username as configured in the control panel
ObjSendMail.Configuration.Fields.Item ("") =""

'SMTP user password as configured in the control panel
ObjSendMail.Configuration.Fields.Item ("") ="**********"

'Configuration for email message
'Email To address
ObjSendMail.To = ""

'Email Subject
ObjSendMail.Subject = "Sending Email Using CDOSYS"

'Email From address
ObjSendMail.From = ""
'Email Body
ObjSendMail.TextBody = "I just sent an email from my MaxESP site using CDOSYS!"
Set ObjSendMail = Nothing

Article ID: 751, Created On: 2/14/2010, Modified: 6/4/2010

Feedback (0)