SQL PHP HTML ASP JavaScript articles and free scripts to download

Sending Mail using CDOSYS in ASP

To send mail from a website we can use CDOSYS. In old version WindowsNT server CDONTS was available but now in Windows hosting servers we have to use CDOSYS. Here is a simple code to send mail from website.

<%
Set plusMail=CreateObject("CDO.Message")
plusMail.Subject="Mail from Windows server using ASP script by with CDO"
plusMail.From="test@sitename.net"
plusMail.To="userid@sitename.com"
plusMail.Bcc="somename@sitename.com"
plusMail.CC="someone@sitename.com"
plusMail.TextBody="This is the text body of the mail"
plusMail.Send
set plusMail=nothing
%>

We can add CC & BCC to it like this.

<%
Set plusMail=CreateObject("CDO.Message")
plusMail.Subject="Mail from Windows server using ASP script by with CDO"
plusMail.From="test@sitename.net"
plusMail.To="userid@sitename.com"
plusMail.Bcc="somename@sitename.com"
plusMail.CC="someone@sitename.com"
plusMail.TextBody="This is the text body of the mail"
plusMail.Send
set plusMail=nothing
%>

To send HTML mail we can configure like this.

<% Set plusMail=CreateObject("CDO.Message")
plusMail.Subject="Mail from Windows server using ASP script by with CDO"
plusMail.From="test@sitename.net"
plusMail.To="userid@sitename.com"
plusMail.HtmlBody="<h1>Welcome to Plus2net.net</h1><br>This is normal line<br><h2>This is h2 line</h2>"
plusMail.Send
set plusMail=nothing
%>

Be the first to post comment on this article :


Google+

Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked



Join Our Email List
Email:  
For Email Newsletters you can trust
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2014 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer