For sending email via ASP it is possible to use an interface called Collaborative Data Objects for NT Server or (CDO for NTS). Messages are sent out using the SMTP server.



The code below shows an example of sending out an email. 







 



 











<%Dim CR
Dim MailText
Dim oCDONTSMail
CR = Chr(10) & Chr(13)


Set oCDONTSMail= CreateObject("CDONTS.NewMail")



oCDONTSMail.From= "emailer@myapp.com"
oCDONTSMail.To= session("mailto")
oCDONTSMail.Cc= "webmaster@visualbuilder.com"
oCDONTSMail.Subject="automated email tutorial"



MailText= "This is an automated email from me " & CR
MailText= MailText& "More text " & CR
MailText= MailText& " And more text "



oCDONTSMail.Body= MailText
oCDONTSMail.Send


Set oCDONTSMail=nothing%>


 



                    

Copyright © 2010 VisualBuilder. All rights reserved