ASP Form Setup
Both CDOSYS and CDONTS are installed on server to allow sending email from ASP.
- References:
Example script:
Dim objSendMail
Set objSendMail = Server.CreateObject("CDO.Message")
Set objConn = Server.CreateObject ("CDO.Configuration")
Dim strSchemas
strSchemas = "http://schemas.microsoft.com/cdo/configuration/"
With objConn
.Fields(strSchemas "smtpserver") = "localhost"
.Fields(strSchemas "smtpserverport") = 25
.Fields(strSchemas "sendusing") = 2
.Fields(strSchemas "smtpconnectiontimeout") = 60
.Fields.Update
End With
Set objSendMail.Configuration = objConn
'**** Path below may need to be changed if it is not correct
'Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:inetpubmailrootpickup"
'Flds.Update
Set ObjSendMail.Configuration = objConn
ObjSendMail.To = "you@yourdomain.com"
ObjSendMail.Subject = "Form Test"
ObjSendMail.From = "you@yourdomain.com"
' 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"
ObjSendMail.Send
Set ObjSendMail = Nothing
%>