<% If strErr <> "" Then %>
Error occurred: <% = strErr %><% End If %> <% If bSuccess Then %>Success!Your Message has been sent. |
|
% ' change to address of your own SMTP server strHost = "popdmz.ccad.edu" If Request("Send") <> "" Then Set Mail = Server.CreateObject("Persits.MailSender") ' enter valid SMTP host Mail.Host = strHost Mail.From = Request("sender") ' From address Mail.AddAddress "admissions@ccad.edu" ' Mail.AddAddress Request("sender") ' message subject Mail.Subject = "CCAD | Catalog Request from the Web" ' message body Mail.Body = "Thank you for your interest in CCAD! This is an automated response confirming that we have received your request and will get back to you soon." &vbCrLf &vbCrLf & _ "_____________________________________" &vbCrLf & _ "This is the information you provided:" &vbCrLf &vbCrLf & _ " First Name: " & Request("first") & vbCrLf & _ " Last Name: " & Request("last") & vbCrLf & _ " Email Address: " & Request("sender") & vbCrLf & vbCrLf & _ "mailing address for printed material" & vbCrLf & _ " Address Line 1: " & Request("address1") & vbCrLf & _ " Address Line 2: " & Request("address2") & vbCrLf & _ " City: " & Request("City") & vbCrLf & _ " State: " & Request("State") & vbCrLf & _ " Zip Code: " & Request("Zip") & vbCrLf & _ " Country: " & Request("country") & vbCrLf & vbCrLf & _ " US Citizen: " & Request("citizen") & vbCrLf & vbCrLf & _ "Area of Interest: " & Request("interest") & vbCrLf & vbCrLf & _ " Expected Entry: " & Request("entryterm") & vbCrLf & vbCrLf & _ " parent email: " & Request("parentemail") & vbCrLf & vbCrLf & _ "Message: " & vbCrLf & Request("Subject2") strErr = "" bSuccess = False On Error Resume Next ' catch errors Mail.Send ' send message If Err <> 0 Then ' error occurred strErr = Err.Description else bSuccess = True End If End If %>