Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 14 of 14
  1. #1
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to send html form data as an html email message in ASP OR using a webpage

    How to send html form data as an html email message in ASP OR using a webpage for this ?

  • #2
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,096
    Thanks
    2
    Thanked 23 Times in 23 Posts
    Google is your friend.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  • #3
    New Coder
    Join Date
    Jul 2007
    Location
    North Carolina, US
    Posts
    32
    Thanks
    1
    Thanked 0 Times in 0 Posts
    There are three email examples on this site. One for text email, one for html email, and one for email with an attachment. There is also a way to create a seperate page and send that page as an email if you want to know how let me know. I suggest that you first setup a text email to make sure your server can even send emails from a webpage. After you get those kinks worked out then move on to html emails. The transistion will be simple. Let me know if you need anything else.

    http://www.asp101.com/samples/

  • #4
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts
    "There is also a way to create a seperate page and send that page as an email if you want to know how let me know. "

    Yes, please tell me this(send a webpage in the email body) ....

  • #5
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What statement I use to include a webpage in an email body ?
    Like for writting html email the statement:
    myMail.HTMLBody = "<h1>This is a message.</h1>"

  • #6
    New Coder
    Join Date
    Jul 2007
    Location
    North Carolina, US
    Posts
    32
    Thanks
    1
    Thanked 0 Times in 0 Posts
    First create your email page in a seperate file. Then change your body code on the page that sends the email to this.
    Code:
    myMail.CreateMHTMLBody "http://www.domain.com/email.html"

  • #7
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts
    asp vars how shown on this webpage ? I just assign to vars the data in the email processor file ?

    var1 = request.form("field1") and so on

  • #8
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts
    also how setup except from the message, the confirmation page (page like email page) ? and also how the email come to a fixed email (mine) and to user email (who submitted form) from the "email" html field ?
    Last edited by lse123; 08-18-2007 at 09:09 AM. Reason: add

  • #9
    New Coder
    Join Date
    Jul 2007
    Location
    North Carolina, US
    Posts
    32
    Thanks
    1
    Thanked 0 Times in 0 Posts
    asp vars how shown on this webpage ? I just assign to vars the data in the email processor file ?

    var1 = request.form("field1") and so on
    You can either make your email page an asp page that pulls the values out of a database or carry the values over as a querystring in the url. This is what it would look like if you carried it over via querystring.
    Code:
    myMail.CreateMHTMLBody "http://www.domain.com/email.html?var1=" & request.form("field1") & "&var2=" & request.form("field1")
    also how setup except from the message, the confirmation page (page like email page) ?
    Don't understand what you're asking for.

    and also how the email come to a fixed email (mine) and to user email (who submitted form) from the "email" html field ?
    Send it to them and either cc or bcc yourself.
    Code:
    myMail.To = "theiraddress@theirdomain.com"
    myMail.Cc = "youraddress@yourdomain.com"
    myMail.Bcc = "youraddress@yourdomain.com"

  • #10
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts
    also how setup except from the message, the confirmation page (page like email page) that shows on browser after submit/send form data ?

    and also how the email come to user email (who submitted form) from the "email" html field [from var not a fixed value] ?

  • #11
    New Coder
    Join Date
    Jul 2007
    Location
    North Carolina, US
    Posts
    32
    Thanks
    1
    Thanked 0 Times in 0 Posts
    also how setup except from the message, the confirmation page (page like email page) that shows on browser after submit/send form data ?
    For a confirmation page you can just put your html in the same page that sends the email.
    and also how the email come to user email (who submitted form) from the "email" html field [from var not a fixed value] ?
    I'm not sure if I'm answering this correctly, but here's how you would use their email address that was entered on the form.
    Code:
    myMail.To = Request.Form("email")
    I'm sorry if I'm not answering these correctly, but I'm having trouble figuring out what you're asking for. Please write out your questions clearly.

  • #12
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For a confirmation page you can just put your html in the same page that sends the email.

    after the html form, where excatly?

  • #13
    New Coder
    Join Date
    Jul 2007
    Location
    North Carolina, US
    Posts
    32
    Thanks
    1
    Thanked 0 Times in 0 Posts
    When you say html form I'm guessing you're talking about the form the user filled out. If so then no. That form should submit to a new page that sends out the email. Your confirmation html should be on that page and after your code that sends out the email.

  • #14
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts

    use <%= var1 %> to confirm page ?

    how to include confirm page code to formprocessor.asp ? asp vars how setup to show on this webpage ? I just assign to vars the data in the email processor file ?
    var1 = request.form("field1") and so on and use <%= var1 %> to confirm page ?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •