Reply
asp form not working properly
Old 11-12-2008, 02:04 PM asp form not working properly
Novice Talker

Posts: 5
Name: Kathy Bradfore
Trades: 0
Hi all,
I am using the sortedsites.com formmail V1.3 and having problems. I have not used an asp form before but it looks like all the rest.

My problem. The form comes through to the e-mail address specified with no errors but only the e-mail address will come through. None of the other fields come through. If anyone can help I would be grateful. The page is www.foundationtande.com/orders.htm

-----------------------------------------------------

This is what comes through on the e-mail:

Here is the results of your form submitted fromwww.foundationtande.com

Name:

Email: treismom12@tds.net


############# End Formmail Tranmission #############
Kathy Bradford is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 11-12-2008, 02:06 PM Re: asp form not working properly
chrishirst's Avatar
Super Moderator

Posts: 21,633
Location: Blackpool. UK
Trades: 0
Need the code.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-12-2008, 02:08 PM Re: asp form not working properly
Novice Talker

Posts: 5
Name: Kathy Bradfore
Trades: 0
wow that was quick. thank you.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Foundation Title and Escrow - Full Service Title and Escrow Company</title>
<style type="text/css">
<!--
body {
background-color: #C5C0A2;
background-image: url(../art/bg01.gif);
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: 604F3d;
}
-->
</style>
<link href="../site.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
a:link {
color: #604f3d;
}
a:visited {
color: #000000;
}
a:hover {
color: #000000;
}
a:active {
color: #604f3d;
}
body,td,th {
font-family: Arial, Helvetica, Sans-serif;
}
.style2 {
font-size: 10
}
.style6 {font-style: italic}
.style7 { color: #5e4e3c;
font-weight: bold;
}
.style8 {color: #5e4e3c}
-->
</style>
</head>

<body>
<div align="center">
<table width="720" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/top.jpg" width="720" height="214" border="0" usemap="#Map" />
<map name="Map" id="Map">
<area shape="rect" coords="9,172,77,203" href="../index.htm" />
<area shape="rect" coords="102,170,183,201" href="aboutus.htm" />
<area shape="rect" coords="215,170,283,201" href="faqs.htm" />
<area shape="rect" coords="485,171,585,203" href="orders.htm" />
<area shape="rect" coords="615,170,710,201" href="contact.htm" />
<area shape="rect" coords="314,167,449,202" href="temp.htm" />
</map></td>
</tr>
<tr>
<td bgcolor="#EFE9C4"><div align="center">
<table width="604" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="left"><img src="art/orderFormhd.gif" width="328" height="46" /><br />
<br />
</div></td>
</tr>
<tr>
<td bgcolor="#EFE9C4"><p align="left"><form method="post" action="formmail/formmail.asp">
<input type=hidden name="recipient" value="info@foundationtande.com">
<input type=hidden name="subject" value="Foundation Title and Escrow, LLC - Order Form">
<input type=hidden name="redirect" value="http://www.founderstande.com/thanks.htm">

<TABLE BORDER="0" CELLPADDING="3" CELLSPACING="3" WIDTH="558" align="center">
<TR>
<TD WIDTH="187" VALIGN="TOP" class="style6">Company Name:</TD>
<TD WIDTH="300"><em><font size="2">
<INPUT NAME="company_name"
TYPE="text" id="company_name" SIZE="30" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD WIDTH="187" VALIGN="TOP" class="style6">Ordered By: </TD>
<TD WIDTH="300"><em><font size="2">
<INPUT NAME="ordered"
TYPE="text" id="ordered" SIZE="24" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD WIDTH="187" HEIGHT="9" VALIGN="TOP" class="style6">Address:</TD>
<TD HEIGHT="9" WIDTH="300"><em><font size="2">
<INPUT NAME="address1"
TYPE="text" id="address1" SIZE="30">
<BR>
<INPUT NAME="address2"
TYPE="text" id="address2" SIZE="30">
</font></em></TD>
</TR>
<TR>
<TD WIDTH="187" VALIGN="TOP" class="style6">City:</TD>
<TD WIDTH="300"><em><font size="2">
<INPUT
TYPE="text" NAME="city" SIZE="18">
</font></em></TD>
</TR>
<TR>
<TD WIDTH="187" VALIGN="TOP" class="style6">State:</TD>
<TD WIDTH="300"><em><font size="2">
<select name="state">
<option>Alabama
<option>Alaska
<option>Arizona
<option>Arkansas
<option>California
<option>Colorado
<option>Connecticut
<option>Delaware
<option>D.C.
<option>Florida
<option>Georgia
<option>Hawaii
<option>Idaho
<option>Illinois
<option>Indiana
<option>Iowa
<option>Kansas
<option>Kentucky
<option>Louisiana
<option>Maine
<option>Maryland
<option>Massachusetts
<option>Michigan
<option>Minnesota
<option>Mississippi
<option>Missouri
<option>Montana
<option>Nebraska
<option>Nevada
<option>New Hampshire
<option>New Jersey
<option>New Mexico
<option>New York
<option>North Carolina
<option>North Dakota
<option>Ohio
<option>Oklahoma
<option>Oregon
<option>Pennsylvania
<option>Rhode Island
<option>South Carolina
<option>South Dakota
<option selected>Tennessee
<option>Texas
<option>Utah
<option>Virginia
<option>Vermont
<option>Washington
<option>West Virginia
<option>Wisconsin
<option>Wyoming
</select>
</font></em></TD>
</TR>
<TR>
<TD WIDTH="187" VALIGN="TOP" class="style6">Zip:</TD>
<TD WIDTH="300"><em><font size="2">
<INPUT TYPE="text" NAME="zip" SIZE="6">
</font></em></TD>
</TR>
<TR>
<TD WIDTH="187" VALIGN="TOP" class="style6">E-mail:</TD>
<TD WIDTH="300"><em><font size="2">
<INPUT
TYPE="text" NAME="email" SIZE="30">
</font></em></TD>
</TR>
<TR>
<TD WIDTH="187" VALIGN="TOP" class="style6">Phone:</TD>
<TD WIDTH="300"><em><font size="2">
<INPUT NAME="phone"
TYPE="text" id="phone" SIZE="12">
</font></em></TD>
</TR>
<TR>
<TD WIDTH="187" VALIGN="TOP" class="style6">Fax:</TD>
<TD WIDTH="300"><em><font size="2">
<INPUT NAME="fax"
TYPE="text" id="fax" SIZE="12">
</font></em></TD>
</TR>
<TR class="style5">
<TD VALIGN="TOP" WIDTH="187"><em>Preferred Method of Contact :</em></TD>
<TD VALIGN="TOP" WIDTH="300"><P><em>
<INPUT
NAME="method" TYPE="checkbox" id="method" VALUE="phone">
Phone</em></P>
<P><em>
<INPUT
NAME="method" TYPE="checkbox" id="method" VALUE="fax">
Fax</em></P>
<P><em>
<INPUT
NAME="method" TYPE="checkbox" id="method" VALUE="email">
E-mail</em></P>
<P><em>
<INPUT
NAME="method" TYPE="checkbox" id="method" VALUE="overnight">
Overnight </em></P> </TD>
</TR>
<TR>
<TD height="24" COLSPAN="2"><P class="style7"><br>
Order Information</P> </TD>
</TR>
<TR>
<TD class="style6">Title Products (Type of Loan): </TD>
<TD><em><font size="2">
<INPUT NAME="title_products"
TYPE="text" id="title_products" SIZE="23">
</font></em></TD>
</TR>
<TR>
<TD class="style6">Loan Amount: </TD>
<TD><em><font size="2">
<INPUT NAME="loan_amt"
TYPE="text" id="loan_amt" SIZE="23">
</font></em></TD>
</TR>
<TR>
<TD WIDTH="187" class="style6">Loan Number: </TD>
<TD WIDTH="300"><P><em> <font size="2">
<INPUT NAME="loan_number"
TYPE="text" id="loan_number" SIZE="23">
</font>
</em></TD>
</TR>
<TR>
<TD COLSPAN="2"><P class="style7"><font size="2"><br>
Subject Property Information</font> </P> </TD>
</TR>
<TR>
<TD HEIGHT="9" VALIGN="TOP" class="style6">Address:</TD>
<TD HEIGHT="9"><em><font size="2">
<INPUT NAME="sub_prop_address1"
TYPE="text" id="sub_prop_address1" SIZE="30">
<BR>
<INPUT NAME="sub_prop_address2"
TYPE="text" id="sub_prop_address2" SIZE="30">
</font></em></TD>
</TR>
<TR>
<TD VALIGN="TOP" class="style6">City:</TD>
<TD><em><font size="2">
<INPUT NAME="sub_prop_city"
TYPE="text" id="sub_prop_city" SIZE="23">
</font></em></TD>
</TR>
<TR>
<TD VALIGN="TOP" class="style6">State:</TD>
<TD><em><font size="2">
<select name="sub_prop_state" id="sub_prop_state">
<option>Alabama
<option>Alaska
<option>Arizona
<option>Arkansas
<option>California
<option>Colorado
<option>Connecticut
<option>Delaware
<option>D.C.
<option>Florida
<option>Georgia
<option>Hawaii
<option>Idaho
<option>Illinois
<option>Indiana
<option>Iowa
<option>Kansas
<option>Kentucky
<option>Louisiana
<option>Maine
<option>Maryland
<option>Massachusetts
<option>Michigan
<option>Minnesota
<option>Mississippi
<option>Missouri
<option>Montana
<option>Nebraska
<option>Nevada
<option>New Hampshire
<option>New Jersey
<option>New Mexico
<option>New York
<option>North Carolina
<option>North Dakota
<option>Ohio
<option>Oklahoma
<option>Oregon
<option>Pennsylvania
<option>Rhode Island
<option>South Carolina
<option>South Dakota
<option selected>Tennessee
<option>Texas
<option>Utah
<option>Virginia
<option>Vermont
<option>Washington
<option>West Virginia
<option>Wisconsin
<option>Wyoming
</select>
</font></em></TD>
</TR>
<TR>
<TD VALIGN="TOP" class="style6">Zip:</TD>
<TD><em><font size="2">
<INPUT NAME="sub_prop_zip" TYPE="text" id="sub_prop_zip" SIZE="6">
</font></em></TD>
</TR>
<TR>
<TD VALIGN="TOP" class="style6">County:</TD>
<TD><em><font size="2">
<INPUT NAME="sub_prop_county"
TYPE="text" id="sub_prop_county" SIZE="18">
</font></em></TD>
</TR>
<TR>
<TD WIDTH="187" height="2" valign="top" class="style6">Legal Description: </TD>
<TD WIDTH="300" height="2" align="left"><P><em>
<font size="2">
<TEXTAREA NAME="sub_prop_legal_descr" COLS="24"
ROWS="5" WRAP="virtual" id="sub_prop_legal_descr"
></TEXTAREA>
</font>
</em></TD>
</TR>
<TR>
<TD COLSPAN="2" class="style7">Borrow/Buyer Info </TD>
</TR>
<TR>
<TD class="style6">Borrow/Buyer #1 Name:</TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="borrow_buyer1"
TYPE="text" id="borrow_buyer1" SIZE="24" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">SSN: </TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="ssn1"
TYPE="text" id="ssn1" SIZE="18" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">Phone (Home): </TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="phone_home1"
TYPE="text" id="phone_home1" SIZE="12" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">Phone (Cell):</TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="phone_cell1"
TYPE="text" id="phone_cell1" SIZE="12" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">Phone (Work): </TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="phone_work1"
TYPE="text" id="phone_work1" SIZE="12" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">Borrow/Buyer #2 Name:</TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="borrow_buyer2"
TYPE="text" id="borrow_buyer2" SIZE="24" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">SSN: </TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="ssn2"
TYPE="text" id="ssn2" SIZE="18" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">Phone (Home): </TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="phone_home2"
TYPE="text" id="phone_home2" SIZE="12" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">Phone (Cell):</TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="phone_cell2"
TYPE="text" id="phone_cell2" SIZE="12" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">Phone (Work): </TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="phone_work2"
TYPE="text" id="phone_work2" SIZE="12" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD colspan="2"><span class="style7">Seller Info</span> <span class="style10">(If purchase must be provided with a copy of the contract) </span></TD>
</TR>
<TR>
<TD class="style5"><span class="style6">Seller Name: </span></TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="seller_name"
TYPE="text" id="seller_name" SIZE="24" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style5"><span class="style6">SSN: </span></TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="ssn_seller"
TYPE="text" id="ssn_seller" SIZE="18" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style5"><span class="style6">Phone (Home): </span></TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="phone_home_seller"
TYPE="text" id="phone_home_seller" SIZE="12" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style5"><span class="style6">Phone (Cell):</span></TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="phone_cell_seller"
TYPE="text" id="phone_cell_seller" SIZE="12" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style5"><span class="style6">Phone (Work): </span></TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="phone_work_seller"
TYPE="text" id="phone_work_seller" SIZE="12" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD colspan="2"><span class="style7">Lender Info</span></TD>
</TR>
<TR>
<TD class="style5"><span class="style6">Lender:</span></TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="lender_name"
TYPE="text" id="lender_name" SIZE="30" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style5"><span class="style6">Address:</span></TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="address_lender"
TYPE="text" id="address_lender" SIZE="24" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style5"><span class="style6">City:</span></TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="city_lender"
TYPE="text" id="city_lender" SIZE="18" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style5"><span class="style6">State:</span></TD>
<TD ALIGN="left"><em><font face="Georgia, Times New Roman, Times, serif" size="2">
<select name="state_lender" id="state_lender">
<option>Alabama
<option>Alaska
<option>Arizona
<option>Arkansas
<option>California
<option>Colorado
<option>Connecticut
<option>Delaware
<option>D.C.
<option>Florida
<option>Georgia
<option>Hawaii
<option>Idaho
<option>Illinois
<option>Indiana
<option>Iowa
<option>Kansas
<option>Kentucky
<option>Louisiana
<option>Maine
<option>Maryland
<option>Massachusetts
<option>Michigan
<option>Minnesota
<option>Mississippi
<option>Missouri
<option>Montana
<option>Nebraska
<option>Nevada
<option>New Hampshire
<option>New Jersey
<option>New Mexico
<option>New York
<option>North Carolina
<option>North Dakota
<option>Ohio
<option>Oklahoma
<option>Oregon
<option>Pennsylvania
<option>Rhode Island
<option>South Carolina
<option>South Dakota
<option selected>Tennessee
<option>Texas
<option>Utah
<option>Virginia
<option>Vermont
<option>Washington
<option>West Virginia
<option>Wisconsin
<option>Wyoming
</select>
</font> </em></TD>
</TR>
<TR>
<TD class="style5"><span class="style6">ZIP:</span></TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="zip_lender"
TYPE="text" id="zip_lender" SIZE="12" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD COLSPAN="2"><span class="style7">Payoff Info </span></TD>
</TR>
<TR>
<TD><span class="style6">1st Mortgage: </span></TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="1st_mortgage"
TYPE="text" id="1st_mortgage" SIZE="24" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">Account #: </TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="acount1"
TYPE="text" id="acount1" SIZE="24" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">Phone #: </TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="phone_acct1"
TYPE="text" id="phone_acct1" SIZE="12" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD><span class="style6">2nd Mortgage: </span></TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="2nd_mortgage"
TYPE="text" id="2nd_mortgage" SIZE="24" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">Account #: </TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="account2"
TYPE="text" id="account2" SIZE="24" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">Phone #: </TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="phone_acct2"
TYPE="text" id="phone_acct2" SIZE="12" MAXLENGTH="50">
</font></em></TD>
</TR>
<TR>
<TD class="style6">Survey Needed? </TD>
<TD ALIGN="left"><p><em><font size="2">
<input name="survey_needed" type="checkbox" id="survey_needed" value="yes">
<span class="style5">Yes
<input name="survey_needed" type="checkbox" id="survey_needed" value="no">
No</span></font></em></p> </TD>
</TR>
<TR>
<TD class="style6">Estimated Close Date: </TD>
<TD ALIGN="left"><em><font size="2">
<INPUT NAME="estimate_close_date"
TYPE="text" id="estimate_close_date" SIZE="12" MAXLENGTH="12">
</font></em></TD>
</TR>
<TR>
<TD valign="top" class="style6">Comments:</TD>
<TD><em><font size="2">
<TEXTAREA NAME="comments"
ROWS="5" COLS="24" WRAP="virtual"
></TEXTAREA>
</font></em></TD>
</TR>
<TR>
<TD valign="top" class="style6">&nbsp;</TD>
<TD><label></label></TD>
</TR>
<TR>
<TD COLSPAN="2" ALIGN="CENTER"><font size="2" class="style3">
<INPUT
NAME="Submit" TYPE="submit" class="site" VALUE="Send">
<INPUT name="Reset" TYPE="reset" class="site" id="Reset" VALUE="Reset">
</font></TD>
</TR>
</TABLE>
</form>
</p> </td>
</tr>
<tr>
<td><div align="left"></div></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td bgcolor="#EFE9C4"><p align="center"><br />
<img src="images/divider.jpg" width="720" height="12" /><br />
<br />
&copy; 2008 Foundation Title and Escrow, LLC - All rights reserved<br />
<br />
</p> </td>
</tr>
</table>
</div>

</body>
</html>
Kathy Bradford is offline
Reply With Quote
View Public Profile
 
Old 11-12-2008, 02:09 PM Re: asp form not working properly
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,674
Name: John Alexander
Trades: 0
Your option tags aren't closed, and your state list is repeated 3 times.

That isn't what's making your form not work, but the code is very difficult to read.
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 11-12-2008, 02:11 PM Re: asp form not working properly
chrishirst's Avatar
Super Moderator

Posts: 21,633
Location: Blackpool. UK
Trades: 0
The ASP code!!!!!
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-12-2008, 02:15 PM Re: asp form not working properly
Novice Talker

Posts: 5
Name: Kathy Bradfore
Trades: 0
ok, I hope this is what you are asking for. I don't see anything else with this form. This was handed to me from someone else. I am just trying to make it work. Thanks!

----------------------------------------------------------------------


<%@ Language = vbscript%>
<%option explicit %>
<%server.scripttimeout = 600 %>
<%
'------------------------------------------- FORMMAIL V1.3 ------------------------------------------

'----------------------------------------------------------------------------------------------------
'copyright information
'----------------------------------------------------------------------------------------------------
'Copyright 2002: Sorted Sites http://www.sortedsites.com
'Authors Jonas Tornqvist, David Parkes and Karl Snares
'This script is Freeware, which means you are free to use and modify
'the script for your own use.
'The only condition is this copyright header remain intact and you don't
'try and sell this script for profit without first asking us.
'And of course also ask Matt Wright who wrote the original perl version of Formmail.

'----------------------------------------------------------------------------------------------------
'license agreement - Important
'----------------------------------------------------------------------------------------------------
'By using this script you agree to indeminfy the developers - Sorted Sites of any loss
'or damages that may arise from its use or missue.
'This script is provided as is with all faults - no warranties and no guarantees.
'basically its free - use it at your own risk and cost.
'No warranties and no tech support - if you need help with this don't ask us!
'The documentation is provided as is with all the help we can offer.
'As we develop this script we shall post updates hopefully fix any bugs
'We are not obliged to release any future versions and we might not bother...
'By using this script you accept this license agreement!

'----------------------------------------------------------------------------------------------------
'documentation v1.3
'----------------------------------------------------------------------------------------------------

'################################################# ################################################## #
'this is where the code starts for real
'################################################# ################################################## #

'----------------------------------------------------------------------------------------------------
'declare variables
'----------------------------------------------------------------------------------------------------
Dim strFrom, strTo, strSubject, strBody
Dim objMessage, objConfig, strServer, intPort
Dim recipient, redirect, subject, realname, email, required, strEmail1, strEmail2
Dim referer, url, url_verified, icounter, query, iloop, query2, query3, i, agree, validation, error0, error0ok

'############################## CONFIGURATION VARIABLES ####################################

'These are the only lines you will need to change
'----------------------------------------------------------------------------------------------------
strServer = "smtp.foundationtande.com" 'set which smtp server will be used to send the email. enter ip address or domain name. eg: "xxx.xxx.xxx.xxx" or "smtp.your-domain.com"
intPort = 25 'set the smtp port to be used when sending mail (by default port 25 is used)
'Referrer's Array is defined here. Enter the valid domains which may use this script.
url = Array("www.foundationtande.com","foundationtande.c om")'Set which urls that will be accepted. http://xxxxx/
'Seperate multiple domains by commas
'eg: url= Array("www.your-domain.com","your-domain.com","www.my-domain.com")
'computer names can be used instead of domains if this script is being run locally
'eg: url = Array("computername")

'######################################### IMPORTANT NOTICE #########################################
'IMPORTANT: do not modify anything below this line unless you know what you are doing!!
'######################################### IMPORTANT NOTICE #########################################

'----------------------------------------------------------------------------------------------------
'information type and CDOSYS constants
'----------------------------------------------------------------------------------------------------
%>
<!--METADATA TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library" -->
<!--METADATA TYPE="typelib"
UUID="00000205-0000-0010-8000-00AA006D2EA4"
NAME="ADODB Type Library" -->
<%
'----------------------------------------------------------------------------------------------------
'retrieved default fields
'----------------------------------------------------------------------------------------------------
recipient = request("recipient")
redirect = request("redirect")
subject = request("subject")
email = request("email")
required = request("required")
if required = "" then
required = "recipient,subject,email,redirect"
else
required = "recipient,subject,email,redirect," & required
end if

'----------------------------------------------------------------------------------------------------
'verify the referer
'----------------------------------------------------------------------------------------------------
referer = request.ServerVariables("HTTP_REFERER")
referer = split(referer,"/")
url_verified = "no"
for icounter = Lbound(url) to Ubound(url) '
if referer(2) = url(icounter) then
url_verified = "yes"
end if
next
if not url_verified = "yes" then
response.write("The url specified is invalid!")
response.End
end if

'----------------------------------------------------------------------------------------------------
'verify the recipient(not tested)
'----------------------------------------------------------------------------------------------------
'trimed_referer = split(referer(2),".")'
'response.write recipient & "<br>" & referer(2) & "=" & trimed_referer(0) & "<br>"
'if trimed_referer(0) = "www" then
' if InStr(1,recipient,trimed_referer(1),1) = 0 then
' response.write "recipient don't match the referer"
' response.end
' end if
'else
' if InStr(1,recipient,trimed_referer(0),1) = 0 then
' response.write "recipient don't match the referer"
' response.end
' end if
'end if

'----------------------------------------------------------------------------------------------------
'retrieve form contents and create email fields
'----------------------------------------------------------------------------------------------------
query = Request.ServerVariables("QUERY_STRING")
query = split(query,"&")
query3 = split(required,",")
For iLoop = Lbound(query) to UBound(query)
query2 = split(query(iloop),"=")

'----------------------------------------------------------------------------------------------------
'form validation, checks required fields are not null
'----------------------------------------------------------------------------------------------------
for i = LBound(query3) to UBound(query3)
if query3(i) = query2(0) then
if query2(1) = "" then
response.write ("you must enter a valid ") & query2(0)
response.end
end if
end if

'if query2(0) = "agree" then
'if query2(1) <> "on" or query2(1) = "" then
' response.write("You must agree to terms and conditions to enable Formmailv1.3 to execute!")
'response.end
'end if
'end if

'----------------------------------------------------------------------------------------------------
'form validation, checks a valid email address has been specified
'----------------------------------------------------------------------------------------------------


'----------------------------------------------------------------------------------------------------
'form validation, checks terms and conditions checkbox has been ticked
'----------------------------------------------------------------------------------------------------

Next
if not query2(0) = "recipient" and not query2(0) = "redirect" and not query2(0) = "subject" and not query2(0) = "realname" and not query2(0) = "email" and not query2(0) = "required" and not query2(0) = "agree" then
strBody = strBody & vbnewline & vbnewline & query2(0) &": " & query2(1)
end if
Next
if email = "" then
email = "formmail@" & referer(2)
end if
'----------------------------------------------------------------------------------------------------
'replaces any special characters parsed through the query string
'----------------------------------------------------------------------------------------------------
strbody = replace(strbody, "+"," ")
strbody = replace(strbody, "%26%238364%3B","€")
strbody = replace(strbody, "%A1","¡")
strbody = replace(strbody, "%A3","£")
strbody = replace(strbody, "%A8","¨")
strbody = replace(strbody, "%AA","ª")
strbody = replace(strbody, "%AC","¬")
strbody = replace(strbody, "%B4","´")
strbody = replace(strbody, "%B7","·")
strbody = replace(strbody, "%BA","º")
strbody = replace(strbody, "%BF","¿")
strbody = replace(strbody, "%C7","Ç")
strbody = replace(strbody, "%E7","ç")
strbody = replace(strbody, "%0D%0A",vbnewline)
strbody = replace(strbody, "%21","!")
strbody = replace(strbody, "%23","#")
strbody = replace(strbody, "%24","$")
strbody = replace(strbody, "%25","%")
strbody = replace(strbody, "%26","&")
strbody = replace(strbody, "%27","'")
strbody = replace(strbody, "%28","(")
strbody = replace(strbody, "%29",")")
strbody = replace(strbody, "%2B","+")
strbody = replace(strbody, "%2C",",")
strbody = replace(strbody, "%2D","-")
strbody = replace(strbody, "%2E",".")
strbody = replace(strbody, "%2F","/")
strbody = replace(strbody, "%3A",":")
strbody = replace(strbody, "%3B",";")
strbody = replace(strbody, "%3C","<")
strbody = replace(strbody, "%3D","=")
strbody = replace(strbody, "%3E",">")
strbody = replace(strbody, "%3F","?")
strbody = replace(strbody, "%5B","[")
strbody = replace(strbody, "%5C","\")
strbody = replace(strbody, "%5D","]")
strbody = replace(strbody, "%5E","^")
strbody = replace(strbody, "%5F","_")
strbody = replace(strbody, "%60","`")
strbody = replace(strbody, "%7B","{")
strbody = replace(strbody, "%7C","|")
strbody = replace(strbody, "%7D","}")
strbody = replace(strbody, "%7E","~")

'----------------------------------------------------------------------------------------------------
'this creates the body of the mail message, the text in quotes can be modified accordingly
'---------------------------------------------------------------------------------------------------
strBody = "Here is the results of your form submitted from" & referer(2) & vbnewline & vbnewline & "Name: " & realname & vbnewline & vbnewline & "Email: " & email & vbnewline & strBody & vbnewline & vbnewline & "############# End Formmail Tranmission #############"

'----------------------------------------------------------------------------------------------------
'checks if a smtp port has been specified, if not it uses the default port 25
'----------------------------------------------------------------------------------------------------
if intport <> 25 then
intport = intport
else
intport = 25
end if

'----------------------------------------------------------------------------------------------------
'send the mail message
'----------------------------------------------------------------------------------------------------
set objMessage = CreateObject("CDO.Message")
objMessage.To = recipient
objMessage.From = email
objMessage.Subject = subject
objMessage.Sender = email
objMessage.Textbody = strBody

'----------------------------------------------------------------------------------------------------
'cdosys configuration setup
'----------------------------------------------------------------------------------------------------
set objConfig = CreateObject("CDO.Configuration")
objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort
objConfig.Fields(cdoSMTPServer) = strServer
objConfig.Fields(cdoSMTPServerPort) = intPort
objConfig.Fields(cdoSMTPAuthenticate) = cdoAnonymous
objConfig.Fields.Update
set objMessage.Configuration = objConfig

'----------------------------------------------------------------------------------------------------
'define error handling procedures
'----------------------------------------------------------------------------------------------------
On Error Resume Next
objMessage.Send
If Err.Number = 0 then
response.write("Formmail v1.3 processed all operations successfully!")
else
response.write("Formmail v1.3 detected the following errors:")& "<br>"
response.write("error no.: ")&err.number & "<br>"
response.write("description: ")&err.description & "<br>"
response.end
End If
On Error Goto 0

'----------------------------------------------------------------------------------------------------
'send them to the page specified
'----------------------------------------------------------------------------------------------------
Response.Redirect redirect

'################################################# ################################################## #
'This is where the code ends
'################################################# ################################################## #
%>
<!-- That's All Folks -->
<!-- Happy Surfing -->
<!-- Credits -->
<!-- David Parkes - Project Planning -->
<!-- Jonas Tornqvist - Lead Programmer version 1-->
<!-- Karl Snares - Lead Programmer version 1.2 & 1.3
<!-- Matt Wright - Original Formmail CGI Developer -->
Kathy Bradford is offline
Reply With Quote
View Public Profile
 
Old 11-13-2008, 06:03 PM Re: asp form not working properly
Novice Talker

Posts: 5
Name: Kathy Bradfore
Trades: 0
thank you so much for you help
Kathy Bradford is offline
Reply With Quote
View Public Profile
 
Old 11-13-2008, 06:12 PM Re: asp form not working properly
chrishirst's Avatar
Super Moderator

Posts: 21,633
Location: Blackpool. UK
Trades: 0
Whoops thought I had posted this.

the ASP code is set to read querystrings (method="get") your form is using method="post"
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-13-2008, 06:21 PM Re: asp form not working properly
Novice Talker

Posts: 5
Name: Kathy Bradfore
Trades: 0
Yes, thank you. I did finally figure it out but wanted to say thank you anyway. You were very quick to respond and help.
Kathy Bradford is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to asp form not working properly
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.25101 seconds with 13 queries