You can save the image somewhere and upload it and paste it into the mail as follows:
private void SendMail()
{
string smtpServer = "mailhost.my.domain.net";
string emailFrom = "blah.blah@blah.com";
string emailTo = "yoyo@yoyo.com";
MailMessage msg = new MailMessage(emailFrom, emailTo, "TestMail...", body);
msg.IsBodyHtml = true;
Attachment item = new Attachment("Images/Logo.JPG");
item.ContentDisposition.Inline = true;
item.ContentDisposition.DispositionType = DispositionTypeNames.Inline;
item.ContentId = "IMAGE_ID";
item.ContentType.MediaType = "image/jpeg";
item.ContentType.Name = "Logo.JPG";
msg.Attachments.Add(item);
SmtpClient client = new SmtpClient(smtpServer);
client.Send(msg);
}
source
share