<%
DIM strEmail, strFirstName, strLastName, strSubject, strComments, Mail
strEmail = request.form("Email")
strFirstName = request.form("FirstName")
strLastName = request.form("LastName")
strSubject = request.form("Subject")
strComments = request.form("Comments")
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "mail.mydomain.com"
Mail.From = strEmail
Mail.AddAddress "
[email protected]"
Mail.username="
[email protected]"
Mail.password="MyPassword"
Mail.Body = strMsgHeader & "Email: " & strEmail & vbCrLf & _
"First Name: " & strFirstName & vbCrLf & _
"Last Name: " & strLastName & vbCrLf & _
"Subject: " & strSubject & vbCrLf & vbCrLf & _
"Comments: " & vbCrLf & strComments
On Error Resume Next
Mail.Send
Set Mail = Nothing
IF Err <> 0 THEN
Response.Write "There has been an error and your message could not be sent through email. Please contact us directly at 1-716-768-6221. " & Err.Description
END IF
%>
<P>
<%
Response.Write strFirstName & ",<br>"
Response.Write "Your message has been successfully sent."
%>,</P>