Faiza shafi

Faiza shafi

  • NA
  • 20
  • 4.5k

send logo in email body

Oct 31 2017 1:57 PM
I want to send logo in the top center of email body in c# winform, Please guide me as I am a new developer.
Here is the code :
 
AlternateView htmlView = AlternateView.CreateAlternateViewFromString(messageHtml, null, "text/html");
LinkedResource logo = new LinkedResource("d:/logo.jpg");
logo.ContentId = "Companylogo";
htmlView.LinkedResources.Add(logo);
 
 
msg.To.Add(myEmail);
msg.From = new MailAddress("[email protected]");
msg.CC.Add(copy);
msg.Subject = (sbj_txt.Text);
msg.AlternateViews.Add(htmlView);
client.Send(msg);
 
 
 
Thanks
Faiza 
 

Answers (8)