<%@ LANGUAGE="VBSCRIPT" %> <% Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "no-cache" Response.Expires = -1 %> <% 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 myCDONTSMail Dim strFrom Dim strTo Dim strSubject Dim strMessage Dim lngImportance Dim strSendServiceLiterature2 Dim strSendReferences2 strFrom=request.form("txtEmail") strTo="drtbober@gmail.com" 'strTo="warren@wozzaworks.com" strSubject = request.form("txtSubject") If strSubject = "" Then strSubject = "Information request from Website" End If 'setup message body strBody="Information from Website" & vbCrLf strBody=strBody & "Name: " & request.form("txtName") & vbCrLf strBody=strBody & "Address: " & request.form("txtAddress") & vbCrLf strBody=strBody & "City: " & request.form("txtCity") & vbCrLf strBody=strBody & "State: " & request.form("txtState") & vbCrLf strBody=strBody & "Zip Code: " & request.form("txtZipCode") & vbCrLf strBody=strBody & "Phone: " & request.form("txtPhone") & vbCrLf strBody=strBody & "Email: " & request.form("txtEmail") & vbCrLf strBody=strBody & "Comments: " & request.form("txtComments") & vbCrLf lngImportance = 2 strCAPTCHA = Trim(Request.Form("txtCaptcha")) if strCAPTCHA = Trim(Session("CAPTCHA")) then Set oCdoMail = Server.CreateObject("CDO.Message") Set oCdoConf = Server.CreateObject("CDO.Configuration") sConfURL = "http://schemas.microsoft.com/cdo/configuration/" with oCdoConf .Fields.Item(sConfURL & "sendusing") = 2 .Fields.Item(sConfURL & "smtpserver") = "localhost" .Fields.Item(sConfURL & "smtpserverport") = 25 .Fields.Update end with If request.form("txtName") <>"" Then strFrom = request.form("txtName")&"<"&strFrom&">" End If with oCdoMail .From = strFrom .To = strTo .Subject = strSubject .TextBody = strBody end with oCdoMail.Configuration = oCdoConf oCdoMail.Send Set oCdoConf = Nothing Set oCdoMail = Nothing Response.redirect("contact.asp") else ErrorMessage = ErrorMessage & "You did not type in the verification info correctly." Session("ErrorCAPTCHA")=ErrorMessage Response.redirect("contact.asp") End If %>