I\'m writing a program that sends emails to users with multiple images (charts) embedded in the Email message body (HTML).
When I tried the sample located here..whic
The other way to embed images in E-mail when using System.Net.Mail is
Attach image from local drive to email and assign a contentID to it and later use this contentID in the image URL.
This can be done by:
var contentID = "Image";
var inlineLogo = new Attachment(@"C:\Desktop\Image.jpg");
inlineLogo.ContentId = contentID;
inlineLogo.ContentDisposition.Inline = true;
inlineLogo.ContentDisposition.DispositionType = DispositionTypeNames.Inline;
msg.IsBodyHtml = true;
msg.Attachments.Add(inlineLogo);
msg.Body = "