<%
Submit = Request.Form("Submit")
company = Request.form("company")
city = Request.form("city")
postal = Request.form("postal")
email = request.form("email")
fname = request.form("fname")
skyklight = request.form("skylight")
quantity = request.form("quantity")
standard = request.form("standard")
custom = request.form("custom")
comments = request.form("comments")
caption = request.form("caption")
if Submit="Submit" then
error = 0
if company = "" then
error1 = "
Company name and address required."
error = 1
end if
if city = "" then
error2 = "
City required."
error = 2
end if
if email = "" then
error3 = "
Email and phone number required."
error = 3
end if
if fname= "" then
error4 = "
First and Last name required."
error = 4
end if
if comments = "" then
error5 = "
Message required."
error = 5
end if
if postal = "" then
error6 = "
Zip/Postal Code required."
error = 6
end if
caption = UCase(caption)
if caption <> "MAYT" then
error80 = "
Please enter the correct caption"
error = 80
end if
end if
if Submit = "Submit" and error = 0 then
dim pageaction
'Response.Write "The Action value is " & Request.Form("pageaction") & "
"
action = ucase(Request.Form("pageaction"))
'Response.Write "The action is: " & action & "
"
recipient = Request.Form("remail")
'Response.Write(recipient)
'if Request.Form("Email") <> "" then
'Response.Write "The areacode value is: " & Request.Form("areacode") & "
"
dim fname, lname, email, areacode, tel1, tel2, comments
dim bodystr
bodystr = bodystr & "This is an order sent by a visitor from your website to your email and cell phone." & vbcrlf & vbcrlf
bodystr = bodystr & "Company = " & CStr(Request.Form("company")) & vbcrlf
bodystr = bodystr & "City State/Province = " & CStr(Request.Form("city")) & vbcrlf
bodystr = bodystr & "Zip/Postal Code = " & CStr(Request.Form("postal")) & vbcrlf
bodystr = bodystr & "Email = " & CStr(Request.Form("email")) & vbcrlf
bodystr = bodystr & "First and Last Name = " & CStr(Request.Form("fname")) & vbcrlf
bodystr = bodystr & "Skylight Type = " & CStr(Request.Form("skylight")) & vbcrlf
bodystr = bodystr & "Quantity = " & CStr(Request.Form("quantity")) & vbcrlf
bodystr = bodystr & "Standard Size = " & CStr(Request.Form("standard")) & vbcrlf
bodystr = bodystr & "Custom Size = " & CStr(Request.Form("custom")) & vbcrlf
bodystr = bodystr & "Additional Information = " & CStr(Request.Form("comments")) & vbcrlf
set myemail = Server.CreateObject("Dynu.Email")
myemail.Host = "192.168.180.11"
myemail.From = "contact@sitedudes.com"
myemail.AddAddress "info@plskylight.com", "PL Skylights"
myemail.Subject = "Website Order Provided by SiteDudes.com: Order form from your website, http://www.plskylight.com"
myemail.addReplyTo email, "" & fname & " " & lname & ""
myemail.Body = bodystr
' REM the below line will set from, to, subject, body and send the email out.
result = myemail.Send()
'end if
bodystr = Replace(bodystr, " ", "+")
PostData = ""
Set HttpReq=Server.CreateObject("WinHttp.WinHttpRequest.5.1")
HttpReq.open "POST","http://64.34.137.185/sendsms.aspx?CellNumber=4165030188&MessageBody=" &bodystr& "&AccountKey=BKY174dd57"
HttpReq.send PostData
Response.Write("
Thank you " & Request.Form("fname") & ". Your order has been submitted. |
")
else
%>
<% end if %>