<%
if (Request.Form("Action") = "Submit Request") then
if Request.Form("Email") = "" then
response.write(" Your request was not sent.")
response.write(" Please press back button and enter an email address.")
else
Set JMail = Server.CreateObject("JMail.SMTPMail")
' Set the mail server
JMail.ServerAddress = "mail.specialtyll.com; hgesrv.3si.net"
' Find out what Category the message is in
if (request.form("Category") = "(Other)") AND NOT (request.form("CategoryOther") = "") then
cstrCategory = request.form("CategoryOther")
else
cstrCategory = request.form("Category")
end if
' Set the sender and subject
JMail.Sender = request.form("Email")
JMail.SenderName = request.form("Name")
JMail.Subject = request.form("MessageType") & " from " & request.form("Name") & " about " & cstrCategory
' Get the recipients mailbox from a form.
JMail.AddRecipient "michael.sadowski@specialtyll.com"
' The body property is bodth read and write.
' If you want to append text to the body you can
' use JMail.Body = JMail.Body & "Hello world!"
' or you can use JMail.AppendText "Hello World!"
' which in many cases is easier to use.
' To add line breaks to the mailbody use vbcrlf
' e.g. Jmail.AppendText "This is a test" & vbCrLf
JMail.Body = "Comment Type: " & request.form("MessageType")
Jmail.AppendText(vbCrLf & "Category: " & cstrCategory)
' JMail.AppendText(vbCrLf & "Comments:" & vbCrLf & request.form("Comments"))
if (Request.Form("Comments") <> "") then
tempinput=Request.Form("Comments")
Comments=split(tempinput,vbCrLf)
maxcounter=ubound(Comments)
Jmail.AppendText(vbCrLf & "Comments: " & Comments(0))
FOR counter=1 TO maxcounter
Jmail.AppendText(vbCrLf & " " & Comments(counter))
NEXT
end if
if (request.form("ContactRequested") = "ContactRequested") then
JMail.AppendText(vbCrLf & "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")
JMail.AppendText(vbCrLf & "Please Contact Me as soon as possible about this matter.")
end if
JMail.AppendText(vbCrLf & "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")
Jmail.AppendText(vbCrLf & "Contact Info: ")
Jmail.AppendText(vbCrLf & "Name : " & request.form("Name"))
Jmail.AppendText(vbCrLf & "Title : " & request.form("Title"))
Jmail.AppendText(vbCrLf & "Company: " & request.form("Company"))
if (Request.Form("Address") <> "") then
tempinput=Request.Form("Address")
Address=split(tempinput,vbCrLf)
maxcounter=ubound(Address)
Jmail.AppendText(vbCrLf & "Street : " & Address(0))
FOR counter=1 TO maxcounter
Jmail.AppendText(vbCrLf & " " & Address(counter))
NEXT
end if
Jmail.AppendText(vbCrLf & "City : " & request.form("City"))
Jmail.AppendText(vbCrLf & "State : " & request.form("State"))
Jmail.AppendText(vbCrLf & "ZIP : " & request.form("ZIP"))
Jmail.AppendText(vbCrLf & "Phone : " & request.form("Telephone"))
Jmail.AppendText(vbCrLf & "FAX : " & request.form("FAX"))
Jmail.AppendText(vbCrLf & "Email : " & request.form("Email"))
BodyText = JMail.Body
JMail.AppendText(vbCrLf & "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")
Jmail.AppendText(vbCrLf & vbCrLf & "Session Info: ")
Jmail.AppendText(vbCrLf & "IP : " & Request.ServerVariables("REMOTE_ADDR"))
Jmail.AppendText(vbCrLf & "IPName : " & Request.ServerVariables("REMOTE_NAME"))
Jmail.AppendText(vbCrLf & "IPUser : " & Request.ServerVariables("REMOTE_USER"))
Jmail.AppendText(vbCrLf & "IPAgent: " & Request.ServerVariables("HTTP_USER_AGENT"))
Jmail.AppendText(vbCrLf & "Date : " & Date)
Jmail.AppendText(vbCrLf & "Time : " & Time)
' 1 - highest priority (Urgent)
' 3 - normal
' 5 - lowest
JMail.Priority = 3
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
' Must make sure that IUSR_???? has access to the following files.
' JMail.AppendBodyFromFile "e:\mail\standard_footer.txt"
' Send it...
' JMail.Execute
IF NOT JMail.execute THEN
Response.Write( "ERROR MESSAGE: " & JMail.ErrorMessage & " " & vbcrlf )
Response.Write( "ERROR SOURCE: " & JMail.ErrorSource & " " & vbcrlf )
Response.Write( "LOG: " & JMail.Log & " " & vbcrlf )
ELSE
response.write(" Your message was sent to Customer Service.")
response.write(" Thank you for your message.")
response.write("The following email was sent on your behalf.")
response.write("Subject: " & JMail.Subject & " " & BodyText & " ")
END IF
end if
else
%>
<% end if %>
|