I don't believe you can embed images into an email with the .net mail.
I also have to send out email's with embedded images that came from a
database. I basically had to write my own SMTP client to replace the built
in .net version. You can also purchase a 3rd party package that will do
this. (I couldn't since our product is resold and it would cause licencing
issues)
Unfortunally I can't send my code...they would probably fire me! But I can
offer you a few pointers on what you should do. Writing you're own SMTP
client isn't as easy as it sounds....there's a lot of standards to follow.
I strongly recommend that you use a 3rd party package...maybe this:
http://www.quiksoft.com/emdotnet/comparison.asp
"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:OZ***************@TK2MSFTNGP11.phx.gbl...
Hi,
I know how to send emails from the .Net environment, even html mails.
But, what is the best way to add images to the html?
A URL to an image somewhere on some server is usually blocked nowadays,
so you need to send the image as attachment. I had some success when I
used the filename (without path) of the attachment as img-src.
Is that the only way or are there better methods?
A related question: some of these images might be stored in the database
or generated "on the fly", but the MailAttachment class uses filenames.
Is there any way to attach some document *without* storing it first?
If not, can I safely delete that temporary file directly after I send the
email to the server?
Hans Kesting