Hi there,
When sending mail as HTML, there are a few things you need to take into account:
1. You need to set IsBodyHhtml to true on the MailMessage object:
Code:
myMessage.IsBodyHtml = true;
2. You don't need to send the doctype and HTML / body tags. All you need is the part within the <body> tags.
3. Images need to be resolvable at the client. In other words, this:
Code:
<img src="../Images/Banner480x60.gif" alt="Planet Wrox banner" />
will never work as the image will be searched for at the user's local machine. Instead, you need a full URL, like this:
Code:
<img src="http://www.yourdomain.com/Images/Banner480x60.gif" alt="Planet Wrox banner" />
If you're testing this locally, you can use
http://localhost:12345 where 12345 is the port number of your development server.
Hope this helps,
Imar