<%@LANGUAGE="VBSCRIPT"%> <% Function CheckCAPTCHA(valCAPTCHA) SessionCAPTCHA = Trim(Session("CAPTCHA")) Session("CAPTCHA") = vbNullString if Len(SessionCAPTCHA) < 1 then CheckCAPTCHA = False exit function end if if CStr(SessionCAPTCHA) = CStr(valCAPTCHA) then CheckCAPTCHA = True else CheckCAPTCHA = False end if End Function %> <% if Request.ServerVariables("REQUEST_METHOD") = "POST" then strCAPTCHA = Trim(Request.Form("strCAPTCHA")) if CheckCAPTCHA(strCAPTCHA) = true then Set myEmailObject = Server.CreateObject("CDO.Message") 'myEmailObject.BodyFormat = 0 'myEmailObject.MailFormat = 0 myEmailObject.To = "stephen.m@mortgages-online.co.uk" myEmailObject.CC = request("email") myEmailObject.BCC = "sjmcaneaney@yahoo.com" myEmailObject.From = request("email") myEmailObject.Subject = "Newsletter" myEmailObject.HTMLBody = "Name
Welcome to the Mortgages-Online Newsletter.

Should you wish to unsubscribe you may do so from any newsletter that we send you.

Mortgages-Online

Here is the information that you provided to us
Name: "+request("title")+"
Firstname: "+request("firstname")+"
Surname: "+request("surname")+"
Email: "+request("email")+"
Postcode: "+request("postcode")+"
" myEmailObject.Send myEmailObject.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Name or IP of Remote SMTP Server myEmailObject.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "213.171.216.114" 'Server port (typically 25) myEmailObject.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 myEmailObject.Configuration.Fields.Update Set myEmailObject = Nothing %> Form Submitted. <% else %> Form Failed. Try Again <% end if end if %>