<%@ Language = "VBScript" %> <% 'Define variables. '==================================================================== 'Set email subject line Const strSubject = "Account Details" 'Set destination email address Const strAdminEmail = "accounts@selseylife.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.selseylife.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 strCompany Dim strCustomerNo Dim strInvoiceNo Dim strOrderNo Dim strTotalValue dim strAdditionalValue dim strtime Dim strUserIP Dim varLocale Dim varDate Dim datGeneralDate Dim Email Dim strtotal strtotal=request.form("TotalValue") strTitle = Request.form("Title") strName = Request.form("Name") strCompany = Request.form("Company") strCustomerNo = Request.form("CustomerNo") strInvoiceNo = Request.form("InvoiceNo") strOrderNo = Request.form("OrderNo") strEmail=request.form("Email") strTotalValue = Request.form("TotalValue") strAdditionalInfo = Request.form("AdditionalInfo") strtime = Request.form("time") 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 & _ "Company: " & strCompany & vbnewline & _ "Customer No: " & strCustomerNo & vbnewline & _ "Invoice No: " & strInvoiceNo & vbnewline & _ "Order No: " & strOrderNo & vbnewline & _ "Total Value: " & strTotalValue & vbnewline & _ "Email: " & strEmail & 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 Email Now Proceed To Paypal!" 'Redirect and show the result Response.redirect (BackURL) End Select %> Selsey Life, Selsey, Accounts Page  <% If Session("msgSent") = "" Then %>Please Fill In Details!<% Else %>Thank You Your Order Has Been Completed<% End If %>

 

<% If Session("msgSent") = "" Then %>

Simply fill in the details below

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

<%=Session("msg")%>

<% End If %>

 


Title

   
Name " class="input_left" />    
Company " class="input_left" />    
Customer No " class="input_left" />    
Invoice No " class="input_left" />    
Order No " class="input_left" />    
Total Value " class="input_left" /> <% Session("msgTotal") = Request.form("TotalValue") %>  
Additional Info    
Email " />    
     
<%Else%>

Message Sent!

<%=Session("MsgSent")%>

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