html email with embedded images

H

Hans Kesting

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
 
R

Rob T

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top