Web & Classic Hosting Help

Using CDONTS to Send Email from Your Windows Hosting Account

CDONTS uses the NewMail object to create and send email.

Note: This method is incompatible with Windows shared hosting websites running IIS 7. If you have IIS 7, see Using CDOSYS to Send Email from Your Windows Hosting Account.

The following ASP code sample demonstrates how to use CDONTS to create and send email:

Dim MyBody

Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= "sender@coolexample.com"
MyCDONTSMail.To= "recipient@coolexample.com"
MyBody = "Body"
MyCDONTSMail.Body= MyBody

set MyCDONTSMail=nothing

Was This Article Helpful?
Thank You For Your Feedback
Glad we helped! Anything more we can do for you?
Sorry about that. How can we be more helpful?