<% Response.Expires = -1500%> <% dim title, firstName, lastName, email, address1, address2, town, county, postcode, country, submit, todayDate, errorStatus, errtitle, errFirst, errLast, errEmail, errAddress, errPostCode, errTown, errCountry, errComments, comments, rab, strEmail, objMail todayDate= Now errTitle = false errFirst = false errLast = false errEmail = false errAddress = false errTown = false errCountry = false errPostCode = false if Request("Submit") = "Submit" then 'stuff has been submitted somehow title = Trim(Request("title")) firstName = Trim(Request("firstName")) lastName = Trim(Request("lastName")) email = Trim(Request("email")) address1 = Trim(Request("address1")) address2 = Trim(Request("address2")) town = Trim(Request("town")) county = Trim(Request("county")) postcode = Trim(Request("postcode")) country = Trim(Request("country")) comments = ReplaceIt(Trim(Request("comments"))) rab = Request("rab") if title = "" then errTitle = true if firstName = "" then errFirst = true if lastName = "" then errLast = true 'if email = "" then errEmail = true if address1 = "" then errAddress = true if postcode = "" then errPostCode = true if town = "" then errTown = true if country = "" then errCountry = true if comments = "" and rab <> "on" then errComments = true dim regEx set regEx = New RegExp regEx.Pattern = "^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" errEmail = regEx.Test(email) 'here comes some very bad programming if errEmail = false then errEmail = true else errEmail = false end if errorStatus = errFirst or errLast or errEmail or errComments if rab="on" then errorStatus = errorStatus or errAddress or errTown or errCountry if errorStatus = false then 'everything is cool go ahead and send some emails somehow if rab="on" then 'send email to brochure@xcedes.com strEmail = "" strEmail = strEmail & "brochurerequest" strEmail = strEmail & "
" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "
Name" & title & " " & firstName & " " & lastName & "
Email" & email & "
 
Address" & address1 & "
" & address2 & "
" & town & "
" & county & "
" & postcode & "
" & country & "
 
Comments" & comments & "
" strEmail = strEmail & "" set objMail = Server.CreateObject("CDONTS.NewMail") objMail.BodyFormat = 0 objMail.MailFormat = 0 'this has changed 'brochure@Xcedes.com objMail.To = "brochure@Xcedes.com" objMail.From = "support@xcedes.com" objMail.Subject = "Brochure Request" objMail.Body = strEmail objMail.send set objMail = Nothing 'send acknowledgement to their email 'strEmail = "Thank you for your request. Your brochure will be with you shortly." set objMail = Server.CreateObject("CDONTS.NewMail") objMail.BodyFormat = 0 objMail.MailFormat = 0 objMail.To = email objMail.From = "support@xcedes.com" objMail.Subject = strEmailBrochureSubject objMail.Body = strEmailBrochureBody objMail.send set objMail = Nothing else 'send email to enquiries@xcedes.com strEmail = "" strEmail = strEmail & "usercomments" strEmail = strEmail & "
" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "" strEmail = strEmail & "
Name>" & title & " " & firstName & " " & lastName & "
Email" & email & "
 
Comments" & comments & "
Address" & address1 & "
" & address2 & "
" & town & "
" & county & "
" & postcode & "
" & country & "
 
" strEmail = strEmail & "" set objMail = Server.CreateObject("CDONTS.NewMail") objMail.BodyFormat = 0 objMail.MailFormat = 0 'this has changed enquiries@xcedes.com objMail.To = "enquiries@xcedes.com" objMail.From = "support@xcedes.com" objMail.Subject = "Comments" objMail.Body = strEmail objMail.Send set objMail = Nothing end if Response.Redirect("xcThankyou.asp?rab="&rab) end if end if %>
">
contactus
Title
First Name(s) <%if errFirst=true then%> * Please enter a valid name<%end if%>
Last Name <%if errLast=true then%> * Please enter a valid name<%end if%>
E-Mail Address <%if errEmail=true then%> *Please enter a valid email address<%end if%>
Comments
Request a Brochure checked<%end if%>>
Address <%if rab="on" and errAddress = true then%>
* Your Address is required if you request a brochure
<%end if%>
Town <%if rab="on" and errTown = true then%>
* Your Town is required if you request a brochure
<%end if%>
County
Postcode <%if rab="on" and errPostCode = true then%>
* Your PostCode is required if you request a brochure
<%end if%>
Country <%if rab="on" and errCountry = true then%>
* Your Country is required if you request a brochure
<%end if%>