I\'m having some difficulty embedding an image from the Properties.Resources to a MailMessage, currently the image does not show in the email i receive.
I have succe
Try look here:
http://www.eggheadcafe.com/community/aspnet/2/10219822/send-mail-with-atttached-image.aspx
From the link above:
static void EmbedImages()
{
var mail = new MailMessage();
mail.From = new MailAddress("me@mycompany.com");
mail.To.Add("you@yourcompany.com");
mail.Subject = "This is an email";
var plainView = AlternateView.CreateAlternateViewFromString(
"This is my plain text content, viewable by those clients that don't support html",
null, "text/plain");
var htmlView = AlternateView.CreateAlternateViewFromString(
"Here is an embedded image.
",
null, "text/html");
LinkedResource logo = new LinkedResource( "c:\\temp\\logo.gif" );
logo.ContentId = "companylogo";
htmlView.LinkedResources.Add(logo);
mail.AlternateViews.Add(plainView);
mail.AlternateViews.Add(htmlView);
var smtp = new SmtpClient("127.0.0.1"); //specify the mail server address
smtp.Send(mail);
}