<% Function SendEmail(sFromAddr, sToAddr, sSubject, sBody, sAttachment) Dim sHTML, sText, myMail, sSch, cdoConfig, cdoMessage, oFso If InStr(LCase(sBody), "") > 0 Then sHTML = sBody sText = RemoveHTML(sBody, True) Else sHTML = "" sText = sBody End If Set cdoConfig = Server.CreateObject("CDO.Configuration") sSch = "http://schemas.microsoft.com/cdo/configuration/" With cdoConfig.Fields .Item(sSch & "sendusing") = 2 ' cdoSendUsingPickup .Item(sSch & "smtpserver") = "localhost" .update End With Set cdoMessage = Server.CreateObject("CDO.Message") With cdoMessage Set .Configuration = cdoConfig .From = sFromAddr .To = sToAddr .Subject = sSubject If Len(sAttachment) <> 0 Then Set oFso = Server.CreateObject("Scripting.FileSystemObject") If oFso.FileExists(sAttachment) Then .AddAttachment sAttachment End If Set oFso = Nothing End If If sHTML <> "" Then .HTMLBody = sHTML .TextBody = sText .Send End With Set cdoMessage = Nothing Set cdoConfig = Nothing End Function Function RemoveHTML(strText, lFormat) Dim sTextOnly, oRegEx Set oRegEx = New RegExp sTextOnly = strText oRegEx.IgnoreCase = True oRegEx.Global = True If lFormat then ' Replace certain HTML tags with some text formatting characters oRegEx.Pattern = "\r\n|(^[ \t]+|[ \t]+$)| " sTextOnly = oRegEx.Replace(sTextOnly, "") oRegEx.Pattern = "[ \t]+" sTextOnly = oRegEx.Replace(sTextOnly, " ") oRegEx.Pattern = "]*>|]*>|

||
||]*>|" sTextOnly = oRegEx.Replace(sTextOnly, vbCrLf) oRegEx.Pattern = "]*>|]*>" sTextOnly = oRegEx.Replace(sTextOnly, vbTab) End If oRegEx.Pattern = "]*>(.*?)" sTextOnly = oRegEx.Replace(sTextOnly, "") oRegEx.Pattern = "<[^>]+>" sTextOnly = oRegEx.Replace(sTextOnly, "") Set oRegEx = nothing RemoveHTML = sTextOnly End Function Sub rw(sText) Response.Write sText End Sub %> Lewis Cleansing - Contact

Contact us today!


<% If Request.Form("posted") = "y" And Not showError Then sFromAddr = "noreply@e64.co.uk" sToAddr = "info@lewiscleansing.co.uk" sSubject = "Enquiry from Lewis Cleansing" sContent = pageContent(true) SendEmail sFromAddr, sToAddr, sSubject, sContent, sAttachment rw "Your enquiry has been submitted and you should have a reply soon." Else %>

Or fill in our short form below.

We aim to answer all email and form enquiries within 24 hours.


*= required field

<% IF Request.Form("posted") = "y" And showError Then %>

Please complete the red highlighted fields

<% End IF %>
Enter your Name:* " size="33" />
   
Company: " size="33" />
   
E-mail address:* " size="33" />
   
Telephone:* " size="33" />
   
Alternative telephone: " size="33" />
   
Service Required:*
   
Additional Info:
   
Validation Code* Please contact us if you have problems seeing this image
Click to change the image
<% If errorMsg <> "" Then Response.Write errorMsg End If %>
   
   
Fields marked with * are required to send your enquiry
   
 
<% End If %>
<% function pageContent(lIsEmail) sBody = "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "
Name: " & Request.Form("*name") & "
Company: " & Request.Form("company") & "
E-Mail: " & Request.Form("*email") & "
Telephone: " & Request.Form("*telephone") & "
Alternative Telephone: " & Request.Form("altphone") & "
Service Required: " & Request.Form("*services") & "
Additional Info: " & Request.Form("enquiry") & "
" pageContent = sBody End Function %>