<%@ LANGUAGE="VBSCRIPT" %> <% option explicit %> <% Response.Buffer = True %> <% '*********************************************************************** ' COPYRIGHT NOTICE ' This VB Code was purchased from www.CJWSoft.com ' Author : Christopher Williams of ' www.CJWSoft.com and www.PowerASP.com ' (c) Copyright 2000 - 2006 by CJWSoft / PowerASP All rights reserved '*********************************************************************** %> <% 'Declaring Variables Dim smtpserver,youremail,yourpassword,ContactUs_Name,ContactUs_Email,ContactUs_Telephone Dim ContactUs_Subject,ContactUs_Body,ContactUs_HeardFrom,Action,IsError ' Edit these 3 values accordingly smtpserver = "smtpauth.dsl.pipex.com" youremail = "atgl25@dsl.pipex.com " yourpassword = "dehodima" ' Grabbing variables from the form post ' KENO - ADD ANY NEW FIELD NAMES HERE ContactUs_Name = Request("ContactUs_Name") ContactUs_Email = Request("ContactUs_Email") ContactUs_Telephone = Request("ContactUs_Telephone") ContactUs_Subject = Request("ContactUs_Subject") ContactUs_HeardFrom = Request("ContactUs_HeardFrom") ContactUs_Body = Request("ContactUs_Body") Action = Request("Action") ' Used to check that the email entered is in a valid format Function IsValidEmail(Email) Dim ValidFlag,BadFlag,atCount,atLoop,SpecialFlag,UserName,DomainName,atChr,tAry1 ValidFlag = False If (Email <> "") And (InStr(1, Email, "@") > 0) And (InStr(1, Email, ".") > 0) Then atCount = 0 SpecialFlag = False For atLoop = 1 To Len(Email) atChr = Mid(Email, atLoop, 1) If atChr = "@" Then atCount = atCount + 1 If (atChr >= Chr(32)) And (atChr <= Chr(44)) Then SpecialFlag = True If (atChr = Chr(47)) Or (atChr = Chr(96)) Or (atChr >= Chr(123)) Then SpecialFlag = True If (atChr >= Chr(58)) And (atChr <= Chr(63)) Then SpecialFlag = True If (atChr >= Chr(91)) And (atChr <= Chr(94)) Then SpecialFlag = True Next If (atCount = 1) And (SpecialFlag = False) Then BadFlag = False tAry1 = Split(Email, "@") UserName = tAry1(0) DomainName = tAry1(1) If (UserName = "") Or (DomainName = "") Then BadFlag = True If Mid(DomainName, 1, 1) = "." then BadFlag = True If Mid(DomainName, Len(DomainName), 1) = "." then BadFlag = True ValidFlag = True End If End If If BadFlag = True Then ValidFlag = False IsValidEmail = ValidFlag End Function %> Maun Motors UK, Commercial Vehicle Sales and Hire - Contact Us <% If Action = "SendEmail" Then ' Here we quickly check/validate the information entered ' These checks could easily be improved to look for more things If IsValidEmail(ContactUs_Email) = "False" Then IsError = "Yes" Response.Write("Please enter a valid email address.
") End If If ContactUs_HeardFrom = "" Then IsError = "Yes" Response.Write("Please select where you heard about our Website
") End If If ContactUs_Name = "" Then IsError = "Yes" Response.Write("Please enter a Name.
") End If If ContactUs_Body = "" Then IsError = "Yes" Response.Write("Please enter a message in order for us to respond to your enquiry.
") End If End If ' If there were no input errors and the action of the form is "SendEMail" we send the email off If Action = "SendEmail" And IsError <> "Yes" Then Dim strBody 'Response.Redirect ("thankyouforquery.html") ' Here we create a nice looking html body for the email ' KENO - ADD ANY NEW FIELD NAMES HERE strBody = strBody & "Enquiry Form submitted at " & Now() & vbCrLf & "

" strBody = strBody & "From http://" & Request.ServerVariables("HTTP_HOST") & vbCrLf & "

" strBody = strBody & "IP " & Request.ServerVariables("REMOTE_ADDR") & vbCrLf & "

" strBody = strBody & "Name" & " : " & " " & Replace(ContactUs_Name,vbCr,"
") & "

" strBody = strBody & "Email" & " : " & " " & Replace(ContactUs_Email,vbCr,"
") & "

" strBody = strBody & "Telephone" & " : " & " " & Replace(ContactUs_Telephone,vbCr,"
") & "

" strBody = strBody & "Subject" & " : " & " " & Replace(ContactUs_Subject,vbCr,"
") & "

" strBody = strBody & "Heard From" & " : " & " " & Replace(ContactUs_HeardFrom,vbCr,"
") & "

" strBody = strBody & "
" & Replace(ContactUs_Body,vbCr,"
") & "
" strBody = strBody & "
" Dim ObjSendMail Set ObjSendMail = CreateObject("CDO.Message") 'This section provides the configuration information for the remote SMTP server. ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network). ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpserver ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False) ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = youremail ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = yourpassword ObjSendMail.Configuration.Fields.Update 'End remote SMTP server configuration section== ObjSendMail.To = youremail ObjSendMail.Subject = ContactUs_Subject ObjSendMail.From = ContactUs_Email ' we are sending a html email.. simply switch the comments around to send a text email instead ObjSendMail.HTMLBody = strBody 'ObjSendMail.TextBody = strBody ObjSendMail.Send Set ObjSendMail = Nothing ' change the success messages below to say or do whatever you like ' you could do a response.redirect or offer a hyperlink somewhere.. etc etc %> <% =Response.Redirect ("http://www.maunmotors.co.uk/thankyouforquery.html") %> <% =Replace(ContactUs_Body,vbCr,"
") %> <% Else %>


Maun Motors On Line Homepage

Contact Us

To email us, click on the appropriate name for an email window.

Sales Department

sales@maunmotors.co.uk


Hire Department

hire@maunmotors.co.uk


Chris Dakin - Finance Manager

finance@maunmotors.co.uk


Andrew Kennedy - Webmaster and IT Manager.

andrew@maunmotors.co.uk


The following people can also be contacted on:

SALES

Open Mon-Fri 08.30 'til 17.45
Saturday 09.30 'til 17.30
Sunday By Appointment

08448 246133
Calls Charged at Local Rate from Anywhere in the UK!

Common Road
Huthwaite
Sutton-In-Ashfield
Nottinghamshire
NG17 6AD

How To Find Maun Motors
Map


Andrew Kennedy
Chris Dakin
Linda Henstock
Russell Fowkes

HIRE

Open Mon-Fri 08.00 'til 17.45
Saturday 08.00 'til 17.30
Sunday - Returns Only

01773 810007

Berristow Lane
South Normanton
Nr. Alfreton
Derbyshire
DE55 2FH


How To Find Maun Motors
Map


Les Hallam
Carl Tyers
Jenny Irish

Alternatively, type your phone number and short details of your query in the boxes and hit the 'Contact Me' button. One of our staff shall recieve this message, and you shall be called back as soon as possible.


Maun Motors will NOT sell your details to a third party, NOR use your details for marketing purposes.  We will ONLY use your details to reply to your enquiry.


Contact Us:

Name:
Email:
Telephone:
Subject:
Where did you hear of our Website?
Message:
 
<% End If %> Back



Thank you

Feedback