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
Try the following:
private static ICollection<LinkedResource> GetLinkedResources()
{
var linkedResources = new List<LinkedResource>();
linkedResources.Add(new LinkedResource(@"imagepath")
{
ContentId = "HeaderId",
TransferEncoding = TransferEncoding.Base64
});
linkedResources.Add(new LinkedResource(@"imagepath")
{
ContentId = "MapId",
TransferEncoding = TransferEncoding.Base64
});
return linkedResources;
}
Then you can call the method as follows:
mailMessage.AlternateViews.Add(GetEmbeddedImage(body));