...

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



lse123
08-15-2007, 11:26 AM
How to send html form data as an html email message in ASP OR using a webpage for this ?

vinyl-junkie
08-16-2007, 04:51 AM
Google (http://www.google.com/search?hl=en&rlz=1B3GGGL_enUS223US223&q=html+email+script+asp&btnG=Search) is your friend.

nbcrockett
08-16-2007, 03:03 PM
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/

lse123
08-17-2007, 08:31 AM
"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) ....

lse123
08-17-2007, 09:00 AM
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>"

nbcrockett
08-17-2007, 03:22 PM
First create your email page in a seperate file. Then change your body code on the page that sends the email to this.


myMail.CreateMHTMLBody "http://www.domain.com/email.html"

lse123
08-17-2007, 10:25 PM
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

lse123
08-17-2007, 10:27 PM
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 ?

nbcrockett
08-20-2007, 01:55 PM
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.


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.


myMail.To = "theiraddress@theirdomain.com"
myMail.Cc = "youraddress@yourdomain.com"
myMail.Bcc = "youraddress@yourdomain.com"

lse123
08-20-2007, 02:07 PM
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] ?

nbcrockett
08-20-2007, 03:02 PM
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.


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.

lse123
08-20-2007, 07:28 PM
For a confirmation page you can just put your html in the same page that sends the email.

after the html form, where excatly?

nbcrockett
08-20-2007, 08:08 PM
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.

lse123
08-21-2007, 07:54 PM
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 ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum