%@ Language=VBScript %>
<%
Call Main()
Sub Main()
Dim Action
Dim ErrorMessage
Dim Captcha
Dim CorrectLetterString
Action = request("Action")
ErrorMessage = Request("ErrorMessage")
Captcha = Request("Captcha")
CorrectLetterString = Request("CorrectLetterString")
Call DrawHeader()
If Action = "" Then
Call DrawForm(ErrorMessage,ThisPagesName)
ElseIf Action = "Submit" then
strCAPTCHA = Trim(Request.Form("strCAPTCHA"))
If CheckCAPTCHA(strCAPTCHA) = true then
Call InsertAndSendMail()
Call DisplayThankYou()
Else
RESPONSE.WRITE "
CheckCAPTCHA failed. Checking " & Trim(Request.Form("strCAPTCHA")) & "!
"
Call DrawForm(ErrorMessage,ThisPagesName)
End If
End If
Call DrawFooter()
End Sub
Function CheckCAPTCHA(valCAPTCHA)
SessionCAPTCHA = Trim(Session("CAPTCHA"))
Session("CAPTCHA") = vbNullString
if Len(SessionCAPTCHA) < 1 then
CheckCAPTCHA = False
exit function
end if
if CStr(SessionCAPTCHA) = CStr(valCAPTCHA) then
CheckCAPTCHA = True
else
CheckCAPTCHA = False
end if
End Function
Sub SendEmail(ToAddress, CCAddress, BccAddress, FromAddress, Subject, Body)
%> <%
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail-gw.fsr.net"
.Update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = FromAddress
.To = ToAddress
.CC = CCAddress
.BCC = BccAddress
.Subject = Subject
.HTMLBody = Body
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
End Sub
Sub DisplayThankYou()
%>
| Thank you for contacting us. Somebody will get back to you shortly. |
| "
theBody = theBody & "Below is the result of your feedback form. It was submitted by " & ClientEmail & " on " & Now() & " " theBody = theBody & "
|
|
||||
| WA CONT # MIKESPB935BU ID license #: RCE-35508 |
Home | Services | Projects | Free Estimate | Map | Contact
All Rights Reserved 2003-2007 Mike's Pole Barns, LLC Web Site by Danielle'sDesign.Com