Most Popular
Recently Added
Recently Updated

ASP Form Setup

 Both CDOSYS and CDONTS are installed on server to allow sending email from ASP.

Example script:

Dim objSendMail

Set objSendMail = Server.CreateObject("CDO.Message")
Set objConn = Server.CreateObject ("CDO.Configuration")

Dim strSchemas
strSchemas = ""

With objConn
.Fields(strSchemas  "smtpserver") = "localhost"
.Fields(strSchemas  "smtpserverport")  = 25 
.Fields(strSchemas  "sendusing") = 2 
.Fields(strSchemas  "smtpconnectiontimeout") = 60
End With

Set objSendMail.Configuration = objConn

'**** Path below may need to be changed if it is not correct
'Flds("") = "c:inetpubmailrootpickup"

Set ObjSendMail.Configuration = objConn
ObjSendMail.To = ""
ObjSendMail.Subject = "Form Test"
ObjSendMail.From = ""

' we are sending a text email.. simply switch the comments around to send an html email instead
'ObjSendMail.HTMLBody = "this is the body"
ObjSendMail.TextBody = "this is the body"


Set ObjSendMail = Nothing

Properties ID: 000065   Views: 3572   Updated: 10 years ago
Filed under: