<% Function="" ValidateEmail(email) ="" Dim="" regEx ="" Set="" regEx="New" RegExp ="" regEx.IgnoreCase="False " regEx.Pattern="^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$" ="" ValidateEmail="regEx.Test(email) " End="" Function ="" Function="" IsInternalField(value) ="" IsInternalField="False " Dim="" internalFieldsArray(3) ="" Dim="" lvalue ="" internalFieldsArray(0)="submit" ="" internalFieldsArray(1)="reset" ="" internalFieldsArray(2)="send" ="" lvalue="LCase(value) " Response.Write="" lvalue ="" For="" Each="" item="" In="" internalFieldsArray ="" If="" item="lvalue" Then ="" IsInternalField="True " End="" If ="" Next ="" End="" Function ="" If="" Request.ServerVariables("REQUEST_METHOD")="POST" Then ="" On="" Error="" Resume="" Next ="" Dim="" strMailTo ="" Dim="" strMailFrom ="" Dim="" strSubject ="" Dim="" strBody ="" Dim="" strSuccessUrl ="" Dim="" strErrorUrl ="" Dim="" strError ="" Dim="" strLine ="" strMailTo="yourname@yourdomain.com" ="" strMailFrom="Request.Form("email") " If="" strMailFrom="" Then ="" strMailFrom="strMailTo " End="" If ="" strSubject="Contact Information" ="" strBody="Values submitted from web site form:" ="" strSuccessUrl="success.html" ="" strErrorUrl="error.html" ="" strError="" ="" If="" ValidateEmail(strMailFrom)="" <=""> True Then Response.Redirect strErrorUrl Response.End End If strBody = strBody & vbCrLF For each inputField in Request.Form If IsInternalField(inputField) <> True Then For each inputValue in Request.Form(inputField) strLine = inputField & " : " & inputValue & vbCrLF strBody = strBody & strLine Next End If Next Dim mailObject Set mailObject = CreateObject("CDO.Message") If err.number <> 0 Then Response.redirect error_url Response.End End If mailObject.To = strMailTo mailObject.From = strMailFrom mailObject.Subject = strSubject mailObject.TextBody = strBody ' dim mailConfig ' set mailConfig = CreateObject("CDO.Configuration") ' mailConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort ' mailConfig.Fields(cdoSMTPServer) = "smtp_server_name" ' mailConfig.Fields(cdoSMTPServerPort) = 25 ' mailConfig.Fields(cdoSMTPConnectionTimeout) = 10 ' mailConfig.Fields(cdoSMTPAuthenticate) = cdoBasic ' mailConfig.Fields(cdoSendUserName) = "username" ' mailConfig.Fields(cdoSendPassword) = "password" ' mailConfig.Fields.Update ' set mailObject.configuration = mailConfig mailObject.Send If err.number <> 0 Then Response.Redirect strErrorUrl else Response.Redirect strSuccessUrl end if Set mailObject = Nothing Response.End End If %>
 
HOME

Contact Us - email form

CURRENT
ACCOMMODATION
YOUR QUERY
YOUR EMAIL
CONTACT NUMBER.
FIRST NAME.
SURNAME.
 
We will contact you as soon as possible, weekends and out of office hours may take longer!
Back to previous page

Westcotes

ACCOMMODATION
FOR STUDENTS
& PROFESSIONALS