Here is my email handler. All the fields work fine, but when I recieve the email It get
Subscription length:
with no value, I am not sure how to set it up here in the body of the email.
<%@ Language=VBScript %>
<%
Session("FName") = Request.Form("FName")
Session("LName") = Request.Form("LName")
Session("Address") = Request.Form("Address")
Session("PCode") = Request.Form("PCode")
Session("Country") = Request.Form("Country")
Session("Phone") = Request.Form("Phone")
Session("Fax") = Request.Form("Fax")
Session("Email") = Request.Form("Email")
Session("Sublength") = Request.Form("SubLength")
if not len(Request.Form("Email")) > 0 then
Session("ErrorFull2") = "You must enter a headline to continue."
Response.Redirect("default.asp")
end if
Set MailObj = CreateObject("CDONTS.NewMail")
strEmail="email"
newstr="First Name: " & Session("FName") & chr(13) & chr(10) & "Last Name: " & Session("LName") & chr(13) & chr(10) & "Address: " & Session("Address") & chr(13) & chr(10) & "Postal Code: " & Session("PCode") & chr(13) & chr(10) & "Country: " & Session("Country") & chr(13) & chr(10) & "Phone: " & Session("Phone") & chr(13) & chr(10) & "Fax: " & Session("Fax") & chr(13) & chr(10) & "Email: " & Session("Email") & chr(13) & chr(10) & "Subscription length: " & Session("Sublength") & chr(13) & chr(10)
MailObj.BodyFormat=1
MailObj.From=strEmail
MailObj.Importance=1
MailObj.Subject="ABN Subscriber"
MailObj.Body=newstr
MailObj.To="email"
MailObj.Send
Set MailObj = Nothing
'Session.Abandon
%>
</script>
<html>
<head>
<title>Atlanticboatingnews.com - Thank You</title>
<link REL="stylesheet" HREF="/oronline.css">
<link REL="SHORTCUT ICON" HREF="/favicon.ico">
</head>
<br>
<table border="0" cellpadding="1" cellspacing="0" width="97%">
<tr>
<td valign="top">
<br>
<b>Your Submission has been received, Thank you!</b><br>
<a href="/default.asp">[u]Click here</u></a> to return to the home page.<br><br><br><br><br><br><br>
</td>
</tr>
</table>
I took out my email address. If you need more just let me know, but everything else is working great except the "sublength".
Thanks for your help
|