Subscribe via Email

Enter your email address to subscribe and receive notifications of new content by email.

Send email with ASP

CDONTS is available on the Windows NT /2000 platforms and provides the necessary objects , methods and properties to send email . You can also send attachments , send HTML mail and various other tasks .

Lets Begin :

First of all we have to create an instance of the CDONTS object , we achieve this like this

Dim objCdonts
Set objCdonts = Server.CreateObject(“CDONTS.NewMail”)

Now we add the various important email addresses  to the script , these include the address you are sending to , the address where the mail is from .

objCdonts.To = “”
objCdonts.From = “”

Now lets add the subject line of the email message. We do this with the following.

objCdonts.Subject = “Hello this is my sample email”

OK hopefully you are still with me , an email is no use without some message in the actual body of it , here is how we go about this .

objCdonts.Body = “Hello , I am just testing this email script out “

OK that’s our email all set up and ready to go but wait we need to send it and once it is sent it always good practice to delete the instance of the CDONTS object and free up resources on your server.

Set objCdonts = Nothing

FacebookTwitterGoogle+PinterestTumblrStumbleUponRedditLinkedInWhatsAppBibSonomyDeliciousDiggDiigoSina WeiboWordPressBlogger PostShare

Leave a Reply





You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>