Contact Us
All fields marked * are required.
%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
If Request("Action") = "SendEnquiry" Then
'If Request("txtCaptchaBox") <> Session("Captcha") Then Response.Redirect("contact-us.php?Action=CaptchaFailed")&"&Title="&Server.URLencode(Request("Title"))&"&Name="&Server.URLencode(Request("Name"))&"&Company="&Server.URLencode(Request("Company"))&"&Address="&Server.URLencode(Request("Address"))&"&Address2="&Server.URLencode(Request("Address2"))&"&Address3="&Server.URLencode(Request("Address3"))&"&Address4="&Server.URLencode(Request("Address4"))&"&PostCode="&Server.URLencode(Request("PostCode"))&"&Country="&Server.URLencode(Request("Country"))&"&txtURL="&Server.URLencode(Request("URL"))&"&Telephone="&Server.URLencode(Request("Telephone"))&"&Fax="&Server.URLencode(Request("Fax"))&"&Email="&Server.URLencode(Request("Email"))&"&How_did_you_hear_about_us="&Server.URLencode(Request("How_did_you_hear_about_us"))&"&Enquiry="&Server.URLencode(Request("Enquiry"))&"fmfeedbackform"
varBadEmail = 0
If Request("txtMySpamTrap") <> "" Then varBadEmail = 1
If varBadEmail = 0 Then 'checks to see if form is good
varFullName = Request("Title") & " " & Request("Name")
varEmail = Request("Email")
' send email to client
set objMail = Server.CreateObject("CDO.Message")
set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "website@go4b2.co.uk"
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "Bra1m3"
cdoConfig.Fields.Update
set objMail.Configuration = cdoConfig
objMail.From = "noreply@go4b.co.uk"
'objMail.To = Request("Email") 'test version
'objMail.To = "stephen@deepblue-digital.co.uk" ' test version
objMail.To = "4b-australia@go4b.com" ' live version
'objMail.CC = "stephen@deepblue-digital.co.uk" ' test version
objMail.CC = "4b-uk@go4b.com" ' live version
objMail.Subject = "Enquiry from go4b.co.uk"
'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
objMail.HTMLBody = ""
objMail.HTMLBody = objMail.HTMLBody & " " & "" & "Enquiry from go4b.co.uk" & "" & " "
If Request("Name") <> "" Then
objMail.HTMLBody = objMail.HTMLBody & "" & "Name: " & "" & varFullName
End If ' name
If Request("Company") <> "" Then
objMail.HTMLBody = objMail.HTMLBody & " " & "" & "Enquiry: " & "" & " " & "Sent at " & Now() & "" & " " & "Dear " & varFullName & "
" & "" & "Company: " & "" & Request("Company")
End If ' company
objMail.HTMLBody = objMail.HTMLBody & "
" & Replace(Request("Enquiry"), vbCrLf, "
") & ""
If Request("Address") <> "" Then
objMail.HTMLBody = objMail.HTMLBody & "
"
objMail.HTMLBody = objMail.HTMLBody & "
" & "Thank you for your Enquiry." & "
" objMail.HTMLBody = objMail.HTMLBody & "" & "A member of our team will contact you regarding your enquiry as soon as possible." & "
" objMail.HTMLBody = objMail.HTMLBody & "" & "Regards" & "
" objMail.HTMLBody = objMail.HTMLBody & "" & "" & "http://www.go4b.co.uk" & "" & "
" objMail.HTMLBody = objMail.HTMLBody & "" & "Sent at " & Now() & "" & "
" objMail.Send() Set objMail = Nothing set cdoConfig = Nothing End If ' send email to applicant if email address is found End If ' run email script if no errors found Response.Redirect("thank-you.php?Action=EnquirySent") End If ' enquiry form submitted %>