I've created a form that needs to be e-mailed as html to the chosen recipients via an ASP script. The server is running Windows Server 2003, Enterprise edition. I found the code below using Google; however, I have not been able to make it work.
I'm very new to ASP and would appreciate any assistance on how to do this.
I'm very new to ASP and would appreciate any assistance on how to do this.
Code:
<%
Set oMail = Server.CreateObject("CDO.Message")
Set oMailConfig = Server.CreateObject ("CDO.Configuration")
oMailConfig.Fields("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver")[/URL] = "localhost"
oMailConfig.Fields("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserverport")[/URL] = 25
oMailConfig.Fields("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")[/URL] = 2
oMailConfig.Fields("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")[/URL] = 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
%>