%
Session("strMsg") = ""
if Len(request.form)>0 Then
valid = false
if (LCase(Request.Form("ImageValue")) <> LCase(Session("yarimagematey")) ) then
Session("strMsg") = "Unfortunately your email was not sent this time.
Please check the image verification field and try again."
elseif ( Request.Form("PracticeName") = "" or Request.Form("DealerGroup") = "" ) then
FirstName = Request.Form("FirstName")
Surname = Request.Form("Surname")
ContactEmail = Request.Form("ContactEmail")
ContactPhone = Request.Form("ContactPhone")
DealerGroup = Request.Form("DealerGroup")
PracticeName = Request.Form("PracticeName")
Session("strMsg") = "Unfortunately your email was not sent this time.
Please check all required fields and try again."
else
valid = true
end if
if (valid) then
Set objMailer = Server.CreateObject("JMail.SMTPMail")
objMailer.Sender = Application("AdminEmail")
objMailer.ContentType = "text/plain"
objMailer.ContentTransferEncoding = "8bit"
objMailer.ReplyTo = Request.Form("ContactEmail")
objMailer.Subject = "Money Market website Demo Request: "
objMailer.Body = "You have received an email from the Australian Money Market website, see below:" & vbCrLf & "---------------------------------------------------------------------------" & vbCrLf & "From: " & Request.Form("FirstName") & " " & Request.Form("Surname") & vbCrLf & "---------------------------------------------------------------------------" & vbCrLf & vbCrLf & "Email: " & Request.Form("ContactEmail") & vbCrLf & "Phone: " & Request.Form("ContactPhone") & vbCrLf & "Practice Name: " & Request.Form("PracticeName") & vbCrLf & "Dealer Group: " & Request.Form("DealerGroup") & vbCrLf
objMailer.AddRecipient Application("AdminEmail")
'objMailer.AddRecipient "hamish.wadham@creativeintersection.com"
objMailer.Execute
objMailer.ClearRecipients
Set objMailer = Nothing
Session("strMsg") = "Thank you for your request to demo the AMM term deposit platform. One of our brokers will be in contact shortly to organise a demo at a time that suits."
FullName = Request.Form("FirstName") & " " & Request.Form("Surname")
Dim cn
'DB Connection and Counter Intigration
Set cn = Server.CreateObject("ADODB.Connection")
%><%
Set objCommand = Server.CreateObject("ADODB.Command")
With objCommand
.ActiveConnection = cn
.CommandText = "uspAMMInsertRequestCounter"
.CommandType = 4
.CommandTimeout = 240
.Parameters.Append .CreateParameter("@colRequestName", 200, 1, -1, FullName)
.Parameters.Append .CreateParameter("@colRequestEmail", 200, 1, -1, Request.Form("ContactEmail"))
.Parameters.Append .CreateParameter("@colRequestType", 200, 1, -1, "Demo Request")
.Parameters.Append .CreateParameter("@colDealerGroup", 200, 1, -1, Request.Form("DealerGroup"))
.Parameters.Append .CreateParameter("@colPracticeName", 200, 1, -1, Request.Form("PracticeName"))
.Execute
End With
'End Request Counter intigration
Response.Redirect ("/forms-demorequest_thankyou.html")
end if
End If
%>