Including Background images in emails sent using System.Net.Mail

A

Augustin Prasanna

We have a requirement to send emails with a specific background image. We use
System.Net.Mail to send the emails. The problem is, outlook 2007 blocks the
background images from being rendered by default. We want the background
image to be displayed automatically without being dependent on the outlook
settings.

We learnt that an alternative solution could be to (one time) compose the
email with background image in outlook and send that content (taken from
'view source') using System.Net.Mail. But we find that the MailMessage
removes the '<Meta>' tag specified for the content type. We even tried
setting the content type using the headers property.

Appreciate if you could help us on this.

Thanks in advance.
 
B

bruce barker

you have to include the images as embedded resources (attachemnts) and
use a src="cid:resourceid". use the LinkedResource class to add a resource.

-- bruce (sqlwork.com)
 

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,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top