<%@ LANGUAGE="VBSCRIPT" %> <% option explicit %> <% Response.Buffer = True %> <% 'Declaring Variables Dim smtpserver,youremail,yourpassword,ContactUs_Name,ContactUs_Email Dim ContactUs_Tel,ContactUs_Body,Action,IsError ' Edit these 3 values accordingly smtpserver = "mail.newdreamdesign.com" youremail = "info@newdreamdesign.com" yourpassword = "Inf0dr3Am" ' Grabbing variables from the form post ContactUs_Name = Request("ContactUs_Name") ContactUs_Email = Request("ContactUs_Email") ContactUs_Tel = Request("ContactUs_Tel") 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 %> professional website design | contact new dream design Cornwall UK
new dream design logo - web design and new media services
welcome to new dream design feature image
home overview services portfolio contact

you are here: new dream design | contact

contact information

new dream design
57 Wroxham Road
Great Sankey
Warrington
Cheshire
WA5 3EF


please feel free to leave a short message with us by using the form below and we will contact you as soon as possible

*the information you provide is treated as confidential and will not be shared


<% 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_Name = "" Then IsError = "Yes" Response.Write("

*Please enter your name.

") End If If ContactUs_Tel = "" Then IsError = "Yes" Response.Write("

*Please enter your phone number.

") End If If ContactUs_Body = "" Then IsError = "Yes" Response.Write("

*You did not enter any comments.

") 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 ' Here we create a nice looking html body for the email strBody = strBody & "Contact Us 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 & "Tel" & " : " & " " & Replace(ContactUs_Tel,vbCr,"
") & "
" strBody = strBody & "
" & Replace(ContactUs_Body,vbCr,"
") & "
" strBody = strBody & "
" Dim ObjSendMail Set ObjSendMail = CreateObject("CDO.Message") objSendMail.From = "info@newdreamdesign.com" objSendMail.ReplyTo = "info@newdreamdesign.com" objSendMail.To = "info@newdreamdesign.com" '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") = "mail.newdreamdesign.com" 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") = "info@newdreamdesign.com" ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "Inf0dr3Am" ObjSendMail.Configuration.Fields.Update 'End remote SMTP server configuration section== ObjSendMail.To = "info@newdreamdesign.com" ObjSendMail.Subject = "ContactUs_Tel" ObjSendMail.From = "info@newdreamdesign.com" ' 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 %>

thank you, your message has been sent. we will contact you soon


you wrote..

<% =Replace(ContactUs_Body,vbCr,"
") %>

 


would you like to:

go to previous page or goto home page?

<% Else %>

name:

email:

tel no:

comments:

<% End If %>

useful information

operating hours are:

9.00am - 5.30pm

Monday - Friday

rule

tel: 07753 685699

rule

general enquiries:

info@newdreamdesign.com

sales enquiries:

sales@newdreamdesign.com

spacer copyright new dream design 2012 sitemap | bookmark/favourites | top spacer

new dream design - web design - e-commerce - content management - stationery and logo design