Hi:

I am trying to use AUTHBOT as a form protector against spambots. I have everything working fine, except that the form will not email the values of the fields. It will write them on the page, but for some reason it will not email them through the processor.

Can anyone help me out with this?

"contact_us.asp"

<!--#include file="security.asp"-->
 
<%
'Make sure this page is not cached
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "No-Store"
 
'Create a new session security code
 seed=Timer
 Call Random
 key=key+Mid(wheel,(seed and 255)+1,1)
 Call Random
 key=key+Mid(wheel,(seed and 255)+1,1)
 Call Random
 key=key+Mid(wheel,(seed and 255)+1,1)
 Call Random
 key=key+Mid(wheel,(seed and 255)+1,1)
 Call Random
 key=key+Mid(wheel,(seed and 255)+1,1)
 Call Random
 key=key+Mid(wheel,(seed and 255)+1,1)
 seed=9257
 enc=enigma(key) 'encrypted value of key
 
%> 
<HTML>
<HEAD>
</HEAD>
<BODY>
                                    <form method="post" name="contact_us" action="check_login.asp">
          <%
            Response.Write("<input type=""hidden"" name=""key"" value="""&key&""">")
          %>
         <TABLE BORDER="0" CELLPADDING="3" CELLSPACING="2" WIDTH="450" ALIGN="center">
          <TR>
           <TD width="200"><font size="2">Name:</font></TD>
           <TD width="250">
           <INPUT NAME="UserName" SIZE="45" MAXLENGTH="70" TYPE="text"></TD>
          </TR>
          <TR>
           <TD width="200"><font size="2">
           Company:</font></TD>
           <TD width="250">
           <INPUT NAME="Company" SIZE="45" MAXLENGTH="70" TYPE="text"></TD>
          </TR>
          <TR>
           <TD width="200"><font size="2">Type 
           of Business:</font></TD>
           <TD valign="bottom" width="250">
           <INPUT NAME="Business" SIZE="45" MAXLENGTH="70" TYPE="text"></TD>
          </TR>
          <TR>
           <TD width="200"><font size="2">
           Email:</font></TD>
           <TD width="250">
           <INPUT NAME="Email" SIZE="45" MAXLENGTH="70" TYPE="text"></TD>
          </TR>
          <TR>
           <TD width="200"><font size="2">
           Phone:</font></TD>
           <TD width="250">
           <INPUT NAME="Phone" SIZE="45" MAXLENGTH="70" TYPE="text"></TD>
          </TR>
          <TR>
           <TD width="200"><font size="2">Fax:</font></TD>
           <TD width="250">
           <INPUT NAME="Fax" SIZE="45" MAXLENGTH="70" TYPE="text"></TD>
          </TR>
          <TR>
           <TD colspan="2"><font size="2">Brief 
           Description of Sign:</font></TD>
          </TR>
          <TR>
           <TD colspan="2">
           <TEXTAREA NAME="Sign" ROWS="5" COLS="52" SOFTWRAP></TEXTAREA></TD>
          </TR>
          <TR>
           <TD width="200"><font size="2">Best 
           time to call:</font></TD>
           <TD width="250">
           <INPUT NAME="Call" SIZE="45" MAXLENGTH="70" TYPE="text"></TD>
          </TR>
 
          <TR>
           <TD width="200">
           <font size="2" color="#FF0000">Security Code:</font></TD>
           <TD width="250"><%showFlash%></TD>
          </TR>
          <TR>
           <TD width="200">
           <font size="2" color="#FF0000">Enter Security Code <b>(Required)</b>:</font></TD>
           <TD width="250"><input type="text" name="securityCode" size="12" maxlength="12" autocomplete="off"></TD>
          </TR>
         </TABLE>
          <p align="center"><input type="submit" name="Submit" value="Continue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="reset" value="Reset"></p>
         </form>
 
</BODY>
</HTML>

goes to "check_login.asp":

<<A href="mailto:%@LANGUAGE="VBSCRIPT">%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="security.asp"-->
<HTML>
<HEAD>
<TITLE></TITLE>
 
</HEAD>
<BODY >
                                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="450">
                                    <tr>
                                      <td>
                                      <TABLE border=0 align=center cellPadding=4 cellSpacing=0>
<tr><td align=center>
<%
key=Request.Form("key")
scode=UCase(Request.Form("securityCode"))
seed=9257
enc=enigma(key) 'get encrypted key to compare to security code
If scode<>enc then 
 'try again
 Response.Write("<font size=2><b>Security Code does not match!</b></font><br>")
 Response.Write("<a href=""contact_us.asp""><font size=2><b><u>Please try again</u></b></font></a>")
Else
 Response.Redirect("contact_us_confirm.asp")
End If
%>
</td></tr>
</table>
 
</BODY>
</HTML>

If the correct verification number was entered, the "check_login.asp"
goes to "contact_us_confirm.asp" which has the code to process and send the form:

<<A href="mailto:%@LANGUAGE="VBSCRIPT">%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Set objMail = Server.CreateObject("CDO.Message")
objMail.Configuration.Fields("[URL]http://schemas.microsoft.com/cdo/configuration/sendusing[/URL]") = 2 
objMail.Configuration.Fields("[URL]http://schemas.microsoft.com/cdo/configuration/smtpserver[/URL]") = "localhost"
 
objMail.From = "[EMAIL="sendform@thissite.com"]sendform@thissite.com[/EMAIL]" ' change this to an email address
objMail.To = "[EMAIL="sendform@thissite.com"]sendform@thissite.com[/EMAIL]" ' change this to your email address
objMail.ReplyTo = Request.Form("Email")
objMail.Subject = "Contact" ' change this to your subject
'Set the e-mail body format (HTMLBody=HTML TextBody=Plain) 
'Set the e-mail body format (HTMLBody=HTML TextBody=Plain) 
objMail.HTMLBody = "<font size=2 face=verdana>"
objMail.HTMLBody = objMail.HTMLBody & "<b>Name:</b> " & Request.Form("UserName") & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "<b>Company:</b> " & Request.Form("Company") & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "<b>Type of Business:</b> " & Request.Form("Business") & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "<b>Email:</b> " & Request.Form("Email") & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "<b>Phone:</b> " & Request.Form("Phone") & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "<b>Fax:</b> " & Request.Form("Fax") & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "<b>Brief Description of Sign:</b> " & Request.Form("Description") & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "<b>Best time to call:</b> " & Request.Form("Call") & "<br><br>"
objMail.HTMLBody = objMail.HTMLBody & "<b>Sent at</b> " & Now() & "</font>"
objMail.Send()
Set objMail = Nothing
%>

I have tried to use a session in the "check_login.asp" page, and both the "check_login.asp" and "contact_us_confirm.asp" pages.

But I haven't had any luck getting the form results email to me.

Can anyone let me know what I'm doing wrong?

Thanks for your help,

SP

For some reason an email mailto tag is being written in the code where I'm declaring it's a VB SCRIPT on this post, but it's not in the actually source code so please ignore that.

Thanks,

SP

This article has been dead for over six months. Start a new discussion instead.