CDONTS Sample script - ASP Sendmail script
« on: November 30, 2008, 10:47:40 AM »
Send mail using CDNOTS ASP component for WIndows base Server. Below is sample code to send an email using CDONTS:

Code: [Select]
<%
  Set objMail = Server.CreateObject("CDONTS.NewMail")

  objMail.To = “Name <[email protected].com>”
  objMail.From = “Name<[email protected].com>”
  objMail.Subject = “CDONTS Sample Script”

  BodyText = “This is a test email.” & vbCRLF
  BodyText = BodyText & “It was sent using CDONTS”  & vbCRLF
  BodyText = BodyText & vbCRLF

  objMail.Body = BodyText
  objMail.AttachFile “c:\attachfile.txt”  // For Attachment

  objMail.Send
%>

Kailash