Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible to use generate HTML Email using ASP?

Status
Not open for further replies.

OnDOT

Programmer
Jul 20, 2001
11
SG
Hi,

I need to use ASP to develop a online form, and the contents collected by the form will be converted into a HTML file to be sent via email.

Any hints on how to go about achieving this?

 
Here is the method that I have used to send html formatted emails generated from a asp form page. Use your form page to collect the data that you want to email then when you submit your form submit it to your email.asp page. Like so.
dim html

html = &quot;<html><head><title>Email form</title></head>&quot;
html = html & &quot;<body>The body of your message would go here&quot;
html = html & &quot;along with your&quot;&FromInfo&&quot;
html = html&&quot;</body></html>&quot;

set shortmail = CreateObject(&quot;CDONTS.NewMail&quot;)
shortmail.From = &quot;someaddress@domain.com&quot;
shortmail.To = &quot;someone@domain.com&quot;
'this could be a variable from your form
shortmail.Subject = &quot;Subject line info&quot;
shortmail.BodyFormat = 0
shortmail.MailFormat = 0
shortmail.Importance = 2
shortmail.Body = html
shortmail.Send
shortmail = Nothing

Of course this will only work if you are using CDONTS.

I hope this helps

Roj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top