<%Function regExpTest(rExpression,bCaseTest,vValue) 'a Function which uses the Regular expresion (rExpression) to test the value (vValue) Set oRE = New RegExp oRe.Pattern = rExpression oRe.ignorecase = bCaseTest bTest = oRe.Test(vValue) Set oRE = Nothing regExpTest = bTest End Function bValid = true error_mail = true If Request.Form("Submit") <> "" then if Request.Form("full_name") = "" _ or Request.Form("email_address") = "" _ or Request.Form("message") = "" _ then bValid = false sMessage = "You haven't completed all the required fields. " end if semail= Request.Form("email_address") bValid = regExpTest("^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$",False,semail) If bValid = True then Set PostMail = CreateObject("CDONTS.NewMail") PostMail.From = semail PostMail.To = "EME-Taskforce@dwp.gsi.gov.uk" PostMail.Subject = "Message from Contact Us page on EMETF website" PostMail.BodyFormat = 0 PostMail.MailFormat = 0 PostMail.Body = Request.Form("message") PostMail.Send Set PostMail = nothing Response.redirect("thanks.asp") end if end if %>

Contact us

<%If smessage <> "" then%>

<%=smessage%>

<%end if%>

" class="aligned" /> <% if not bValid AND Request.Form("full_name") = "" then response.write"error" End if %>

" class="aligned" /> <% if not bValid AND Request.Form("email_address") = "" then response.write"error" End if %>

<% if not bValid AND Request.Form("message") = "" then response.write"error" End if %>

Contact us

Lady smiling