CDONTS Sample Script

Please note that CDONTS has been deprecated and is available only on our Windows 2000 servers. If your site is hosted on a Windows 2003 or 2008 server please have a look at CDOSYS. Below is a simple CDONTS example written in ASP.

  Dim objMail
  Set objMail = Server.CreateObject("CDONTS.NewMail")
     objMail.From = ""
     objMail.Subject = "CDONTS Samples"
     objMail.To = ""
     objMail.Body = "This is a sample message sent using CDONTS." 
  Response.write("Mail was Sent")
  'You must always do this with CDONTS.
  set objMail = nothing

Modify the values above as appropriate then copy the code above into a file called cdontstest.asp on your site. When that's done go to If the test was successful the screen should show "Mail was Sent" and should receive the email test.

Add Feedback