When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles
Message Board
Related Web Technologies
User Tips!
Coding Tips

Sample Chapters
Commonly Asked Message Board Questions
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Stump the SQL Guru!
XML Info
Author an Article
ASP ASP.NET ASP FAQs Message Board Feedback
Print this page.
A Simple CDONTS Example
By Rob Taylor

Here is a simple example of sending an email using CDONTS.

  Dim objMail
  Set objMail = Server.CreateObject("CDONTS.NewMail")
     objMail.From = "rob@tconsult.com"
     objMail.Subject = "How TO send email with CDONTS"
     objMail.To = "someone@someplace.com"
     objMail.Body = "This is an email message" & vbcrlf&_ 
     "with CDONTS." & vbcrlf&_
     "It is really easy. " 
 Response.write("Mail was Sent")
 'You must always do this with CDONTS.
  set objMail = nothing

FAQ Table of Contents   Gettting Started: The SMTP Service Sending an Email with an Attachment 

ASP.NET [1.x] [2.0] | ASPFAQs.com | Advertise | Feedback | Author an Article