AspAlliance.com LogoASPAlliance: Articles, reviews, and samples for .NET Developers
URL:
http://aspalliance.com/articleViewer.aspx?aId=310&pId=-1
HTML Emails with ASP with embedded image attachments
page
by Chris Garrett
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 7377/ 14

HTML Emails with ASP with embedded image attachments

HTML Emails with ASP with embedded image attachments
by Chris Garrett

This script will show you how to send a HTML email, but also it demonstrates the attachURL functionality which allows you attach an image or other object to the email and link to it from the message.

See it in action
http://authors.aspalliance.com/chrisg/tools/htmlemail.asp

View Source
http://authors.aspalliance.com/chrisg/tools/view-htmlemail.asp.asp

Download
http://authors.aspalliance.com/chrisg/tools/download.asp?file=htmlemail.asp

Lines 45 and 46 set the appropriate parameters to allow a HTML email. If you comment out line 50 then this will work fine for most HTML email requirements.

In the message body if you put in a reference to an image src ordinarily the client email program would have to connect to the URL to download it. If you use AttachURL as in line 50 you can tell the object that you want the file specified to be sent along with the text and any URL that references it should see that image.

I have asked several people on the ASP lists to test this out and for Microsoft Outlook readers the results are mixed when using AttachURL, from working fine through to seeing the source of the message. If in doubt, reference the full URL rather than using attachURL.

 


Product Spotlight
Product Spotlight 

©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-03-29 12:35:49 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search