%
'**** SEND FORM ***************************
IF Request.form("Active") <> "" Then
dim strRequestFirstName
dim strRequestLastName
dim strRequestreplytocomments
dim strRequestphoneoremail
dim strRequesttimetocontact
dim strRequestEmail
dim strRequestTelephone
dim strRequestNotes
dim strRequestFind
strRequestFirstName = Replace(CSTR(Request.Form("First_Name")),"'","''")
strRequestLastName = Replace(CSTR(Request.Form("Last_Name")),"'","''")
strRequestreplytocomments = Request.Form("replytocomments")
strRequestphoneoremail = Request.Form("phoneoremail")
strRequesttimetocontact = Request.Form("timetocontact")
strRequestEmail = Replace(CSTR(Request.Form("EMail")),"'","''")
strRequestTelephone = Replace(CSTR(Request.Form("Telephone")),"'","''")
strRequestNotes = Replace(CSTR(Request.Form("Notes")),"'","''")
strRequestFind = Replace(CSTR(Request.Form("find")),"'","''")
%>
<%
dim objCDOMail
dim strFrom
dim strTo
dim strMessageFormat
dim strSubject
dim strBody
Sub SendMail(strFrom, strTo, strMessageFormat, strSubject, strBody)
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.From = strFrom
objCDOMail.To = strTo
objCDOMail.Mailformat = strMessageFormat ' Specifies HTML Message Format
objCDOMail.Bodyformat = strMessageFormat ' Specifies HTML Message Format
objCDOMail.Subject = strSubject
objCDOMail.Body = strBody
objCDOMail.Send
Set objCDOMail = Nothing
End Sub
%>
<%
Function DoWhiteSpace(str)
If str <> "" Then
DoWhiteSpace = (Replace(str, vbCrlf, "
"))
End If
End Function
%>
<%
strFrom = "webform@appliedcorporatefinance.co.uk(ACF Other Contact Form)"
strTo = "info@appliedcorporatefinance.co.uk "
'strTo = "anthony@pedalo.co.uk"
strMessageFormat = 0
strSubject = "Website Enquiry Form"
strBody = "" & vbcrlf
strBody = strBody & "" & vbcrlf
strBody = strBody & "Here are the results of the ACF Other Contact Form:
"
strBody = strBody & "Name = " & strRequestFirstName & " " & strRequestLastName & "
"
strBody = strBody & "Email = " & strRequestEmail & "
"
strBody = strBody & "Your Comments:
" & DoWhiteSpace(strRequestNotes) & "
"
strBody = strBody & "Would you like ACF to reply to your comments? = " & strRequestreplytocomments & "
"
strBody = strBody & "Would you like ACF to reply to your comments by 'phone or by email? = " & strRequestphoneoremail & "
"
strBody = strBody & "When would be the most convenient time to 'phone you (please tick)? = " & strRequesttimetocontact & "
"
strBody = strBody & "Telephone= " & strRequestTelephone & "
"
strBody = strBody & "How did you hear of ACF? :
" & DoWhiteSpace(strRequestFind) & "
"
strBody = strBody & "FORM submitted at " & Now() & "
"
Call SendMail(strFrom, strTo, strMessageFormat, strSubject, strBody)
response.redirect "pages/thank_you_other.htm"
End If
'*************************************
%>
|