Another very simple C# sample based on a mail merge application I have been working on. This time I would like to show you how to use the System.Net.Mail facilities to programmatically embed images in the html body of an email.
The trick here consists in creating an AlternateView instance for the body of the email and adding the images to this view via LinkedResource instances. Also, note how the paths to the original images inside de html body are replaced with unique identifiers that map to their embedded siblings.
More details on this approach can be found here.