Simple CDONTS

Simple CDONTS

Here are two simple examples for using CDONTS to send an email message from your website. A couple of notes:

  • These scripts pass values from a form, which you will see below with the Request.QueryString("FIELDNAME") labels.
  • The code vbcrlf&_ simply adds a line break in the email text.
<%Set objCDO1 = Server.CreateObject("CDONTS.NewMail") objCDO1.To = Request.QueryString("recipient") objCDO1.From = "test@test.com" objCDO1.cc = "test@test.com" objCDO1.Subject = Request.QueryString("subject") objCDO1.Body = Request.QueryString("name") & " has submitted an online registration for this program. Email address is: " & Request.QueryString("email") & ". Phone number is " & Request.QueryString("phone") & ". He/She learned about this event from " & Request.QueryString("referral") & vbcrlf&_ "Address 1: " & Request.QueryString("Address1") & vbcrlf&_ "Address 2: " & Request.QueryString("Address2") objCDO1.Send 'send off the email ! Set objCDO1 = Nothing %>

Posted: 2007-02-22


Reader Comments


PennComm Family of Websites: JabberGroups Youth Group Manager | JabberText Group Text Messaging | WebOSCenter.com Palm & WebOS News