Data not delivered from form using ASPmailer......

Discussion in 'ASP General' started by Ciberguy, Jun 3, 2004.

  1. Ciberguy

    Ciberguy Guest

    I created a form that collects information from a user via a web page. The
    form appears to work well - it won't let you submit the form until required
    data is place in the required fields.

    I receive the email from the form via the ISP but the data collected from
    the form is not there. Where did it go?

    Here is a copy of the code I am using - It's standard.

    <!--- mailer.asp --->
    <%
    Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
    Mailer.FromName = Request.Form("mailer")
    Mailer.FromAddress= ""
    Mailer.RemoteHost = "000.000.00.11"
    Mailer.AddRecipient "mailer",""
    Mailer.Subject = "Customer Request from web site"
    strMsgHeader = "Form information follows:" & vbCrLf
    for i=1 to Request.Form.Count
    strMsgInfo=strMsgInfo & Request.Form.Key(i) & "- " &
    Request.Form.Item(i) & vbCrLf
    next
    strMsgFooter = vbCrLf & "End of information"
    Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter
    if Mailer.SendMail then %>
    <% Response.Write "Mail sent..." %>
    <% Response.redirect "thankyou.htm" %>
    <% else %>
    <% Response.Write "Mail send failure. Error was " & Mailer.Response
    end if
    %>

    I know that this code works on another site I have created NOT using CSS.
    This is the first site that I am creating a site using CSS.

    Here is the address to the form:
    http://www.previewmysite.com/quintinjohnstone.com/noseyneighbour.htm

    Thanks!

    Any suggestions or comments welcome!
     
    Ciberguy, Jun 3, 2004
    #1
    1. Advertising

  2. Ciberguy

    Ray at Guest

    Put in a

    RESPONSE.WRITE BodyText
    RESPONSE.END '''optional - if not used, commentout the response.redirect
    line

    just before teh "If Mailer.Send..." line. This will show you what's
    supposed to be sent.

    Also, you don't have to do:

    <% code %>
    <% code %>
    <% code %>
    <% code %>

    You can just do:

    <%
    code
    code
    code
    code
    %>

    Ray at home

    "Ciberguy" <> wrote in message
    news:%...
    > I created a form that collects information from a user via a web page. The
    > form appears to work well - it won't let you submit the form until

    required
    > data is place in the required fields.
    >
    > I receive the email from the form via the ISP but the data collected from
    > the form is not there. Where did it go?
    >
    > Here is a copy of the code I am using - It's standard.
    >
    > <!--- mailer.asp --->
    > <%
    > Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
    > Mailer.FromName = Request.Form("mailer")
    > Mailer.FromAddress= ""
    > Mailer.RemoteHost = "000.000.00.11"
    > Mailer.AddRecipient "mailer",""
    > Mailer.Subject = "Customer Request from web site"
    > strMsgHeader = "Form information follows:" & vbCrLf
    > for i=1 to Request.Form.Count
    > strMsgInfo=strMsgInfo & Request.Form.Key(i) & "- " &
    > Request.Form.Item(i) & vbCrLf
    > next
    > strMsgFooter = vbCrLf & "End of information"
    > Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter
    > if Mailer.SendMail then %>
    > <% Response.Write "Mail sent..." %>
    > <% Response.redirect "thankyou.htm" %>
    > <% else %>
    > <% Response.Write "Mail send failure. Error was " & Mailer.Response
    > end if
    > %>
    >
    > I know that this code works on another site I have created NOT using CSS.
    > This is the first site that I am creating a site using CSS.
    >
    > Here is the address to the form:
    > http://www.previewmysite.com/quintinjohnstone.com/noseyneighbour.htm
    >
    > Thanks!
    >
    > Any suggestions or comments welcome!
    >
    >
     
    Ray at, Jun 3, 2004
    #2
    1. Advertising

  3. Ciberguy

    Ciberguy Guest

    "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
    message news:%...
    > Put in a
    >
    > RESPONSE.WRITE BodyText
    > RESPONSE.END '''optional - if not used, commentout the response.redirect
    > line
    >
    > just before teh "If Mailer.Send..." line. This will show you what's
    > supposed to be sent.


    Thanks Ray!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    Ciberguy, Jun 3, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    344
  2. Automatic Email Delivery Software

    Message could not be delivered

    Automatic Email Delivery Software, Aug 23, 2004, in forum: Python
    Replies:
    0
    Views:
    421
    Automatic Email Delivery Software
    Aug 23, 2004
  3. Replies:
    0
    Views:
    321
  4. MAILER-DAEMON
    Replies:
    0
    Views:
    337
    MAILER-DAEMON
    Oct 14, 2004
  5. Replies:
    0
    Views:
    271
Loading...

Share This Page