Hi Reticulated,
I think Paul's suggestion in reasonable. The System.Net.Mail namespace in
.net 2.0 provide powerful support for sending html rich mail with embeded
resources:
#Linked Resource
http://www.systemnetmail.com/faq/2.6.aspx
Also, if you're limited to .net 1.1., you can consider interop the CDO sys
component which can help created multipart html content, see the below
articles:
#Convert HTML to MHTML using ASP.NET
http://www.codeproject.com/aspnet/aspnethtml2mht.asp
#Build a C# Multipart MIME Encoding Library to Save Web Pages in "MHT"
Formathttp://www.eggheadcafe.com/articles/20040527.asp
Hope also helps. Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Paul Henderson" <pa***********@pittville.demon.co.uk>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Re: Attachment Fails with Invalid Cast Exception
| Date: 17 Jan 2006 11:35:11 -0800
| Organization:
http://groups.google.com
| Lines: 17
| Message-ID: <11**********************@g47g2000cwa.googlegroups .com>
| References: <up**************@TK2MSFTNGP10.phx.gbl>
| <11**********************@g49g2000cwa.googlegroups .com>
| <#n**************@TK2MSFTNGP12.phx.gbl>
| NNTP-Posting-Host: 80.176.138.59
| Mime-Version: 1.0
| Content-Type: text/plain; charset="iso-8859-1"
| X-Trace: posting.google.com 1137526516 20206 127.0.0.1 (17 Jan 2006
19:35:16 GMT)
| X-Complaints-To:
gr**********@google.com
| NNTP-Posting-Date: Tue, 17 Jan 2006 19:35:16 +0000 (UTC)
| In-Reply-To: <#n**************@TK2MSFTNGP12.phx.gbl>
| User-Agent: G2/0.2
| X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB;
rv:1.7.12) Gecko/20050919 Firefox/1.0.7,gzip(gfe),gzip(gfe)
| Complaints-To:
gr**********@google.com
| Injection-Info: g47g2000cwa.googlegroups.com; posting-host=80.176.138.59;
| posting-account=DT8-8g0AAADIbuXu9UnoJLlayTLfmGC6
| Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfee d00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.d ca.giganews.com!nntp.gigan
ews.com!postnews.google.com!g47g2000cwa.googlegrou ps.com!not-for-mail
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:371507
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| > Is there any way to encode the image into the message
| > without using an attachment?
|
| With .NET 1.1, which I guess you're using, there does not seem to be.
| Version 2.0 adds this functionality in the System.Net.Mail (rather than
| System.Web.Mail) classes, using the 'LinkedResource' class which lets
| you attach chunks of data to different views of a multipart message.
| There is no direct equivalent in .NET 1.1, and I do not know of a way
| of manipulating the message content directly to add the required
| fields. You would probably have to do your own mail class, that would
| let you modify the content directly (set up a multipart/related chunk
| and add a ContentID header to the image) and send it through SMTP (this
| would not be trivial, but is perfectly possible if you have the
| time...). Alternatively, upgrade to .NET 2.0, if that's an option for
| you. It's also possible that someone else has written something that
| does this, but I don't know of any
|
|