<%@ LANGUAGE="VBSCRIPT" %> <%Option Explicit%> <% Response.Buffer = true Response.Expires = -1 '*** Dim Variables Dim strFirstName : strFirstName = "" Dim strInitial : strInitial = "" Dim strLastName : strLastName = "" Dim strCompany : strCompany = "" Dim strAddress : strAddress = "" Dim strSuite : strSuite = "" Dim strCity : strCity = "" Dim strState : strState = "" Dim strZip : strZip = "" Dim strPhoneAreaCode : strPhoneAreaCode = "" Dim strPhonePrefix : strPhonePrefix = "" Dim strPhoneNumber : strPhoneNumber = "" Dim strMobileAreaCode : strMobileAreaCode = "" Dim strMobilePrefix : strMobilePrefix = "" Dim strMobileNumber : strMobileNumber = "" Dim strEmail : strEmail = "" Dim intOptIn : intOptIn = 0 Dim strFaxAreaCode : strFaxAreaCode = "" Dim strFaxPrefix : strFaxPrefix = "" Dim strFaxNumber : strFaxNumber = "" Dim strComments : strComments = "" Dim intInputErr: intInputErr = 0 Dim strErrMsg: strErrMsg = "" Dim oMsg: Set oMsg = Nothing Dim strMsgBody: strMsgBody = "" '***On Form Submit Store Data and Redirect If(Request.Form("Submit") <> "") Then strFirstName = Request.Form("txtFirstName") strInitial = Request.Form("txtInitial") strLastName = Request.Form("txtLastName") strCompany = Request.Form("txtCompany") strAddress = Request.Form("txtAddress") strSuite = Request.Form("txtSuite") strCity = Request.Form("txtCity") strState = Request.Form("txtState") strZip = Request.Form("txtZip") strPhoneAreaCode = Request.Form("txtPhoneAreaCode") strPhonePrefix = Request.Form("txtPhonePrefix") strPhoneNumber = Request.Form("txtPhoneNumber") strMobileAreaCode = Request.Form("txtMobileAreaCode") strMobilePrefix = Request.Form("txtMobilePrefix") strMobileNumber = Request.Form("txtMobileNumber") strEmail = Request.Form("txtEmail") if Request.Form("cbOptIn") <> "" then intOptIn = 1 strFaxAreaCode = Request.Form("txtFaxAreaCode") strFaxPrefix = Request.Form("txtFaxPrefix") strFaxNumber = Request.Form("txtFaxNumber") strComments = Request.Form("txtComments") ' validate form data If strFirstName = "" Or strLastName = "" Or strCompany = "" Or strAddress = "" _ Or strCity = "" Or strState = "" Or strZip = "" Or strPhoneAreaCode = "" _ Or strPhonePrefix = "" Or strPhoneNumber = "" Or strEmail = "" Then intInputErr = 1 strErrMsg = "Some of the form data is either missing or invalid. Please make the necessary corrections and resubmit the form." End If If intInputErr = 0 Then ' format message body strMsgBody = strMsgBody & Session("Contact_Header") & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "" & vbCRLF strMsgBody = strMsgBody & "
Customer Information:
First Name: " & strFirstName & "
Middle Init: " & strInitial & "
Last Name: " & strLastName & "
Company: " & strCompany & "
Address: " & strAddress & "
Suite #: " & strSuite & "
City: " & strCity & "
State: " & strState & "
Zip: " & strZip & "
Phone: " & "(" & strPhoneAreaCode & ") " & strPhonePrefix & "-" & strPhoneNumber & "
Mobile: " & "(" & strMobileAreaCode & ") " & strMobilePrefix & "-" & strMobileNumber & "
Fax: " & "(" & strFaxAreaCode & ") " & strFaxPrefix & "-" & strFaxNumber & "
Email: " & strEmail & "
Opt-In: " if intOptIn = 1 then strMsgBody = strMsgBody & "Yes" Else strMsgBody = strMsgBody & "No" End If strMsgBody = strMsgBody & "
 

Comments:

" & strComments & "
" & vbCRLF On Error Resume Next Set oMsg = Server.CreateObject("Persits.MailSender") ' set up object properties With oMsg .Host = Session("MailHost") .FromName = strFirstName & " " & strLastName .From = strEmail .AddAddress Session("Contact_To"), Session("Contact_To_Name") .AddAddress "mseay@buckeye-telesystem.com", "Michael Seay" .Subject = Session("Contact_Subject") .IsHTML = True .Body = strMsgBody .Send End With Set oMsg = Nothing Response.Redirect("contact_confirm.html") Response.End End If End If %> Buckeye TeleSystem
<% If intInputErr = 1 Then %> <% End If %>
<%=strErrMsg %>
First Name Last Name  
 
Company  
 
Street Address Suite #
City State ZIP
Phone Mobile
( ) - ( ) -
Email  
 
Tell us why you chose Buckeye TeleSystem.