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

  • Thread starter Thread starter Augustin Prasanna
  • Start date Start date
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.
 
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)
 
Back
Top