Internet Services
Language / Idioma
Future Shock Hosting in English Hosting con Future Shock en Espaņol
 

CDONTS


:

Below is the VBscript code required to send a simple email using CDONTS.

<%
Set cdoMessage = Server.CreateObject("CDONTS.NewMail")
cdoMessage.To = "toEmailAddress"
cdoMessage.From = "fromEmailAddress"
cdoMessage.Subject = "Subject here..."
cdoMessage.Body = "Message here..."
cdoMessage.Send
Set cdoMessage = Nothing
%>

The same can be accomplished even more simply using:

<%
Set cdoMessage = Server.CreateObject("CDONTS.NewMail")
cdoMessage.Send "fromEmailAddress", "toEmailAddress", "Subject...", "Message..."
Set cdoMessage = Nothing
%>

If you wish to use CDONTS contants by name (rather than by value), you will need to add the following Type Library reference to the top of your script:

<!--METADATA TYPE="typelib" NAME="Microsoft CDO for NTS 1.2 Library" UUID="0E064ADD-9D99-11D0-ABE5-00AA0064D470"-->

Click here to return to the previous page.


 

 

 

 

 
   
Last Modified: 7th February 2007. All content © 2003 Future Shock