CDOSYS email component replaced the old Microsoft's email component CDONTS. It is recommended now to use CDOSYS instead of CDONTS when emailing from ASP.
Here is how to use CDOSYS to send email from ASP:
<%
Set oMail = Server.CreateObject("CDO.Message")
Set oMailConfig = Server.CreateObject ("CDO.Configuration")
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
oMailConfig.Fields.Update
Set oMail.Configuration = oMailConfig
oMail.From = "your-email@your-domain.com"
oMail.To = "recipient@another-domain.com"
oMail.Subject = "Here goes the email subject..."
oMail.HTMLBody = "Here goes the email body..."
oMail.Send
Set oMail = Nothing
Set oMailConfig = Nothing
%>
|