You can send email with CDOSYS on your Windows ASP account using the following example.
Please update the neccessary fields marked in bold below with your actual details.
<% 'Create the e-mail server objectSet objCDOSYSMail = Server.CreateObject("CDO.Message")Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")'Set and update fields properties
With objCDOSYSCon
NOTE: SMTP authentication is required to send email locally from the server. If you have any issues getting this to work, then please contact us for further assistance.' Specify the authentication mechanism to basic (clear-text) authentication cdoBasic = 1
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
'SMTP Server username
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "you@your-email-here.com"
'SMTP Server password
.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "YourPasswordHere"
'Out going SMTP server
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
'SMTP port
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
'CDO Port (1=localhost 2=network)
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
'Timeout
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60.Fields.Update
End With'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSConWith objCDOSYSMail
'Who the e-mail is from
.From = "<you@your-email-here.com>"'Who the e-mail is sent to
.To = "<to@to-email-here.com>"'The subject of the e-mail
.Subject = "Website Enquiry"'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
.HTMLBody = "this is the body"
'.TextBody = "this is the body"'Send the e-mail
.SendEnd with
'Close the server mail object Set objCDOSYSMail = Nothing Set objCDOSYSCon = Nothing %>
Looking for reliable Windows hosting with Award Winning Customer Support?
Grab your hosting today with a 20% discount. All plans come with our 60 Money Back Guarantee!
Check out our plans & promotions on our website -- https://www.peopleshost.com/