CDO SendMail Script

<%
email = "[email protected]"
'check for email address...
if (email <> "") then 'need an email addy

Set Mail = Server.CreateObject("CDO.Message")

Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.mydomain.com" 'SMTP link to your server
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = ***Port ID*** 'SMTP Port
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1 'Use SSL for the connection
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "[email protected]" 'email account actually sent from
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password" 'password for email account from above

Mail.Configuration.Fields.Update

Mail.From = "[email protected]" 'email you want it to be sent from

Mail.To = "[email protected]" 'email you want it sent to

Mail.HTMLBody = "Body Content Goes Here" 'content ofemail

Mail.Subject = "Subject" 'subject of email

On Error Resume Next
Mail.Send

if Err <> 0 Then
Response.Write "<font color=red size=+1>An error occurred while sending the email....</font>"
response.write(Err.Description)
else
response.write("Thank you.") 'Thank you for sending email
end if 'error
else
response.write("No Email submitted. Please try again") 'Need email to send to to process
end if 'need an email

%>