% 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 DIM MemID,WebID,Msg Msg = request("Msg") strCAPTCHA = request("strCAPTCHA") MemID = request("MemID") WebID = request("WebID") CaptchaCheck = CheckCAPTCHA(strCAPTCHA) SubmitButton = request("checkcaptcha") IF SubmitButton = "Submit" THEN FirstName = request("FirstName") LastName = request("LastName") Address = request("Address") City = request("City") State = request("State") ZipCode = request("ZipCode") Telephone = request("Telephone") BestTime = request("BestTime") Email = request("Email") TypeService = request("TypeService") Other_Info = request("Other_Info") Heard_How = request("Heard_How") Set Mail = Server.CreateObject("Persits.MailSender") Mail.Host = "localhost" ' Specify a valid SMTP server Mail.From = "admin@ydig.com" ' Specify sender's address Mail.FromName = "Ydig.com Contact Request" ' Specify sender's name Mail.AddAddress "ryanydig@hotmail.com", "ydig.com" Mail.AddBCC "az@intuitiveis.com", "webmaster" Mail.AddReplyTo Email Mail.Subject = "Ydig.com Contact Request" Mail.Body = "Ydig.com Contact Request"&Chr(13)&Chr(10)&_ "*******************************************************************************"&Chr(13)&Chr(10)&Chr(13)&Chr(10)&_ "Date Submitted: "&date()&Chr(13)&Chr(10)&_ "First Name: "&FirstName&Chr(13)&Chr(10)&_ "Last Name: "&LastName&Chr(13)&Chr(10)&_ "Address: "&Address&Chr(13)&Chr(10)&_ "City: "&City&Chr(13)&Chr(10)&_ "State: "&State&Chr(13)&Chr(10)&_ "Zip: "&ZipCode&Chr(13)&Chr(10)&_ "Phone: "&Telephone&Chr(13)&Chr(10)&Chr(13)&Chr(10)&_ "Best Time To Call: "&BestTime&Chr(13)&Chr(10)&_ "Email: "&Email&Chr(13)&Chr(10)&_ "Type of Service: "&TypeService&Chr(13)&Chr(10)&_ "Other Info: "&Other_Info&Chr(13)&Chr(10)&Chr(13)&Chr(10)&_ "How They Heard: "&_ Heard_How&Chr(13)&Chr(10)&Chr(13)&Chr(10) On Error Resume Next Mail.IsHTML = FALSE Mail.Send If Err <> 0 Then Response.Write "Error encountered: " & Err.Description End If response.redirect "index.html" ELSEIF CaptchaCheck = FALSE AND LEN(strCAPTCHA) > 0 THEN Msg = "The security image did not match your entry, please try again" END IF %>