<% Set myMail=CreateObject("CDO.Message") if Request("subject") <> "" then myMail.Subject=Request("subject") else myMail.Subject="<Subject>" end if if Request("from") <> "" then myMail.From=Request("from") else myMail.From="<From Email Address>" end if if Request("To") <> "" then myMail.To=Request("To") else myMail.To="<To Email Address>" end if if Request("Cc") <> "" then myMail.CC=Request("Cc") else myMail.CC="<CC Email Address>" end if myMail.TextBody= request("body") myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'SMTP server myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="<SMTP Server>" 'SMTP port myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 myMail.Configuration.Fields.Update On Error Resume Next myMail.Send If Err <> 0 Then Response.Write "An error occurred: " & Err.Description else Response.Write("<b>") Response.Write("Email sent to " & request("to") & " from " & request("from")) Response.Write("<br><br>") End If set myMail=nothing %>
Last Updated on May 25, 2017