faqts : Computers : Programming : Languages : Asp : ASP/VBScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

47 of 63 people (75%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

how to send mail by ASP. Need to installed anything? What is ASPMAil and CONTS?

Jun 28th, 2002 00:53
Ivan Lanin, joanna tan,


You have to use ActiveX Component to do this.
If you're using ASP in WinNT or Win2K Server, you have CDONTS component 
installed by default (unless you customized your Windows installation. 
You could send mail by using CDONTS.NewMail object like this:
<%
set o_mailer = Server.CreateObject("CDONTS.NewMail")
o_mailer.From = "[email protected]"
o_mailer.To = "[email protected]"
o_mailer.Subject = "Test"
o_mailer.Body = "Hello, how are you" &vbCrLf& "I'm testing send mail 
function of CDONTS"
o_mailer.Send
set o_mailer = nothing
%>
You could also use other component like ASPMail to do this. Consult the 
component manual on how to do that.



© 1999-2004 Synop Pty Ltd