<% 'Specify your captcha length here, this is the only configuration requirement captchaLength = 5 Function captcha(captchaLength) if captchaLength > 15 then captchaLength = 15 HighestValue = left(100000000000000,captchaLength) lowestValue = left(999999999999999,captchaLength) Randomize intHighestNumber = Int((HighestValue - LowestValue + 1) * Rnd) + LowestValue session("captcha") = Int(intHighestNumber) x = 1 Response.Write vbcrlf & "
" & vbcrlf & vbtab & "" & vbcrlf while x <= captchaLength response.write vbtab & vbtab & "" & vbcrlf x = x + 1 wend Response.Write vbtab & "" & vbcrlf & "
" & vbcrlf End Function if request.form("hSubmit") = "Captcha" then if cstr(request.form("captcha")) = cstr(session("captcha")) then name = Replace(TRIM( Request.Form( "name" ) ),"'","") phone = Replace(TRIM( Request.Form( "phone" ) ),"'","") email = Replace(TRIM( Request.Form( "email" ) ),"'","") message = Replace(TRIM( Request.Form( "message" ) ),"'","") 'question8 = Replace(TRIM( Request.Form( "q14" ) ),"'","") 'question8 = Replace(TRIM( Request.Form( "q15" ) ),"'","") 'question8 = Replace(TRIM( Request.Form( "q16" ) ),"'","") 'question8 = Replace(TRIM( Request.Form( "q17" ) ),"'","") email = Trim( Request.Form( "email" )) Dim oMail Set oMail = CreateObject("cdo.message") oMail.From = "donotreply@MidlandGas.com" 'oMail.ContentType = "text/html;" oMail.To ="info@midlandgas.co.uk" oMail.Subject = "MidlandGas - Online Form Submission" oMail.HTMLBody = "
Hi,

We got following information through an online form submission,

" & _ "" & "" & "
Name:  " & Request.Form("name") & "
" & _ "" & "" & "
Contact No.:  " & Request.Form("phone") & "
" & _ "" & "" & "
E-mail:  " & Request.Form("email") & "
" & _ "" & "" & "
Comments:" & Request.Form("message") & "
" & _ "


Regards
Online Team
" & _ "


Disclaimer: Please do not reply to this message.
" oMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'Name or IP of remote SMTP server oMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ ="localhost" 'Server port oMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _ =25 oMail.Configuration.Fields.Update 'Response.Write(sStr) oMail.Send Response.Write("") else sErrMsg = "Please enter correct numbers from the image below" end if end if 'Code for sending mails 'name= Request.Form("name") 'email = Request.Form("email") %>

0121 663 0906

Wolverhampton: 01902 213196
Walsall: 01922 235176
Dudley/Stourbridge: 01384 913526

Privacy Policy

At Midland Gas, we place the highest importance on respecting and protecting the privacy of our customers. Our most important asset is our relationship with our customers. Therefore, we would like to share with you the following principles that govern our information security practices and other privacy aspects of our website.

Your Information is Protected

We work to protect your personal information from loss, misuse or unauthorized alteration by using industry-recognized security safeguards. We use both internal and external resources to review our security procedures. Our employees are trained and required to safeguard your information.

  • We do not sell or rent your personal information to anyone or any organisation.
  • We do not share your personal information with anyone outside Midland Gas.
  • Worcester
  • Vaillant
  • Baxi
  • Alpha
  • Keston

We have called on Midland Gas a few times now. Each time their service is great. Their skills in ensuring that we have the right solution are spot on and consistently high in standard. Great job lads.

Kay Claire