HTML,ASPI,ever,wondered,send,email,haveand,co
Quick Search for:  in language:    
HTML,ASPI,ever,wondered,send,email,haveand,co
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
ASP/ VbScript Stats

 Code: 144,429 lines
 Jobs: 168 postings

 
Sponsored by:

 

You are in:

 
Login


 

 


Latest Code Ticker for ASP/ VbScript.
Click here to see a screenshot of this code!Ping in ASP
By Michele_Garneri on 10/28

(Screen Shot)

Embed Real Player Object
By Ziae Mousavi m. on 10/27


Set Country --> Combobox
By Hohl David on 10/27


Client Side Sorting of records
By Ravi Rajan on 10/26


Recordset paging with images
By Ravi Rajan on 10/26


Click here to see a screenshot of this code!Online photo catalogue VBScript 2.1
By Ivan Loire on 10/26

(Screen Shot)

GPS 1.4 WYSIWYG
By Guo Xu on 10/25


Click here to see a screenshot of this code!A Network Monitor tool from ActivXperts Software Inc.
By Freddy Hofstadt on 10/25

(Screen Shot)

Socket samples based on Winsock, TCP/IP and client/server communication
By Ronny Bright on 10/25


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

Sending an HTML Email with ASP

Print
Email
 

Submitted on: 6/14/2000 5:51:43 PM
By: Brad Humphrey  
Level: Intermediate
User Rating: By 13 Users
Compatibility:ASP (Active Server Pages)

Users have accessed this article 29848 times.
 
(About the author)
 
     Have you ever wondered how to send an HTML email in ASP?...I have...and when I couldn't find it here on Planet Source Code when I was stuck I figured it was my turn to return the favour to the site!! This code will send nicely formated HTML emails

This article has accompanying files
 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
To send an HTML file in ASP you simply have to add a few more lines to what would be a regular email message!

winzip iconDownload article

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzipto decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this article(in the Intermediate category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
6/15/2000 8:37:51 AM:Magnus Simonarson
Works great....I've been looking for this for ages...Thanks!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/19/2000 4:21:56 PM:Jamie Daniel
How can I add pictures and backgrounds to the html email. I tried using HTML tags to do it but I have had no luck.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/19/2000 10:42:40 PM:Brad Humphrey
Put the images on a server somewhere and route the pics and backgrounds to those images on that server. Most likely the persom getting that email is still going to be on the internet when he/she reads that email and therefore the email will grab those images off of the server.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/19/2000 11:00:25 PM:adam
Where do you get the CDONTS file at? I keep getting this error:
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/21/2000 5:19:50 AM:Krede
Your server has to support CDONTS. You have to install the SMTP components in Service Pack 4 on a NT server. Good luck
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/27/2000 1:21:16 PM:jim
do you know how to format the text in an email. i have tried using html tags, but that doesn't seem to work. can you advis anything?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/11/2000 9:21:03 PM:VisualBlind
what do you mean by objMail?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/11/2000 9:24:23 PM:VisualBlind
Where can I get that CDONTS.newmail object, i get an error...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/19/2001 8:44:35 AM:Vinkie
Is it possible to include variables passed from a form. I have a submit page that is sending 3 varialbe, location, name and email. when I tried to use insert Request.Form(name) it choked. I also tried: objCDO.Body =
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/7/2001 10:38:03 PM:bench
won't this code run in Win98 OS?...i got an ActiveX Component error.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/23/2001 1:31:30 PM:Reply to vinkie:
make your 3 form results all variables.. name = request.form(
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/23/2001 1:31:59 PM:Reply to vinkie:
make your 3 form results all variables.. name = request.form("name") etc and the in the body part put: "Thank you " & name &" @ " & email & ", from " & location - There, thats how to add form results to an e-mail, hope that helped :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/24/2001 8:12:10 AM:Sandeep
I want to get in to email marketing with preferably asp solutions which might be hosted on a hired server space. Kindly suggest step-by-step procedure and requirements. I have simple codes in asp .
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/22/2001 4:12:13 AM:Rob
I couldn't see the background image thru web-based email server such as: Yahoo, Hotmail etc. What should I do to fix this issue. Thanks Rob -- etouring@hotmail.com
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/3/2001 11:07:31 AM:Alfonso Vega
I want to send html-email from several forms , I need to do it with a button but , I don't can to do a programm for each form inside body of message. Can you do it? It's possible ? I tried with
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/28/2001 1:56:37 PM:Robert Ellis
This will be a great tool. I have one question though. How do you email multiple users at one time? ellisre@1fssg.usmc.mil
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/21/2002 5:20:37 PM:Jim Moss
I am unable to download the article. The zip file contains one txt file.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/14/2002 11:38:16 AM:virtualsailor
jim moss if the .txt file comes up go to file save as. And to you others which ASP host should i use for this? brinkster doesnt work :(
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/28/2002 8:43:46 AM:Alirezasaberi
I'm Using a linux server and get CDONT Error Help me?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/29/2002 4:34:16 AM:xxx
xxx
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this article has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular article, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | ASP/ VbScript Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.