<%@ Language = "VBScript" %> <% 'Define variables. '==================================================================== 'Set email subject line Const strSubject = "Website Query" 'Set destination email address Const strAdminEmail = "sales@rebootco.co.uk" 'Set Mail Object to be used - Mail Objects are (1)CDONTS (2)CDOSYS (3)AspMail (4)Jmail (5)AspEmail Const strMailObject = "CDOSYS" 'Set SMTP Server Address Const strSMTPServer = "mail.rebootco.co.uk" 'Set redirect URL Dim BackURL BackURL = Request.ServerVariables("HTTP_REFERER") '==================================================================== Select Case Request.Querystring("Action") Case "Send" 'on error resume next 'Set variables Dim strTitle Dim strName Dim straddress Dim strtown Dim strcity Dim strcounty Dim strpostcode Dim strTelephone dim strnote Dim strUserIP Dim varLocale Dim varDate Dim datGeneralDate strTitle = Request.form("Title") strName = Request.form("Name") strTelephone = Request.form("Telephone") strnote = Request.form("note") strUserIP = Request.ServerVariables("REMOTE_ADDR") strToEmail = strAdminEmail strFromEmail = Trim(Request.form("Email")) varLocale = SetLocale(2057) varDate = Now() datGeneralDate = FormatDateTime(varDate, 0) strEmailBody = "This message was sent by " & strTitle & " " & strName & " at " & datGeneralDate & vbnewline & _ "--------------------------------------------------------------------------------" & vbnewline & vbnewline & _ "Sender Details" & vbnewline & vbnewline & _ "Title: " & strTitle & vbnewline & _ "Name: " & strName & vbnewline & _ "Message: " & strnote & vbnewline & _ "Telephone: " & strTelephone & vbnewline & _ "Email: " & strFromEmail & vbnewline & _ "--------------------------------------------------------------------------------" & vbnewline & _ "Sender IP Address: " & strUserIP 'Set Server Side Validation to make ensure correct email addresses are used If strToEmail = "" OR strFromEmail = "" Then Session("msg") = "You have not entered an email address!" Response.redirect (BackURL) Else 'Trigger email Call SendMail(strToEmail, strFromEmail, strSubject, strEmailBody) End If 'Show thank you messaqe Session("MsgSent") = "We have received your Message!" 'Redirect and show the result Response.redirect (BackURL) End Select %> Reboot Computer & Web Services  <% If Session("msgSent") = "" Then %>Please Fill In Details!<% Else %>Thank You Your Message Has Been Sent<% End If %>
<% If Session("msgSent") = "" Then %>

Simply fill in the details below

<% If Session("msg") <> "" Then %>

<%=Session("msg")%>

<% End If %>

 


  Your Info                                                                                                   




" class="input_left"/>
" class="input_left" />

" class="input_left" />

 

<%Else%>

Message Sent!

<%=Session("MsgSent")%>

<% End If 'Kill session Session("MsgSent") = "" Session("msg") = "" %>