Forum Moderators: open

Message Too Old, No Replies

aspmail + new asp coder = no clue!?!?

         

bac76

3:40 am on Mar 31, 2004 (gmt 0)

10+ Year Member



I am trying to configure some aspmail script and everything works fine only when the form is submitted I recieve an email message but it is blank...
Actually it says.....
Form information follows
Form information ends

So how do I get my form fields to occupy this annoying text?

<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "Life Insurance Quote"
Mailer.FromAddress= "root@lifeinsurancexperts.com"
Mailer.RemoteHost = "Mail24.safesecureweb.com"
Mailer.AddRecipient "Webmaster", "root@lifeinsurancexperts.com"
Mailer.Subject = "Life Insurance Quote"

strMsgHeader = "Form information follows" & vbCrLf
for each qryItem in Request.Form
strMsgInfo = strMsgInfo & qryItem & " - " & request.Form(qryItem) & vbCrLf
next
strMsgFooter = vbCrLf & "End of form information"
Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter

if Mailer.SendMail then
Response.Write "Form information submitted..."
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
%>

Zaphod Beeblebrox

9:42 am on Mar 31, 2004 (gmt 0)

10+ Year Member



Well, the only possible conclusion is that the Request.Form collection is empty.

sslcheap

12:41 pm on Mar 31, 2004 (gmt 0)

10+ Year Member



Have you given names to all of your form fields? If they contain data but are not named then they will not appear.

bac76

8:39 pm on Mar 31, 2004 (gmt 0)

10+ Year Member



Thanks guys.
Somehow I figured it out.
On my form page, I removed one of the attributes in the form action and it seems to work fine. There must have been some sort of conflict.