io farei così:
salverei il grafico come immagine, includerei l'immagine come attach nella mail per poi visualizzarla nel codice HTML.
Ecco il codice di esempio:
codice:
/////////////////////////////////////////////////////////////////////
// Build a mail object.
//
MailMessage mail = new MailMessage();
mail.To.Add("anyreceiver@anydomain.com");
mail.From = new MailAddress("anyaddress@anydomain.com");
mail.Subject = "Test email - CSSMTPSendEmail";
mail.Body = "Welcome";
mail.IsBodyHtml = true;
// Attachments
string attachedFile = "<attached file path>";
mail.Attachments.Add(new Attachment(attachedFile));
// Embedded image in the message body
mail.Body += "
<img alt=\"\" src=\"cid:image1\">";
string imgFile = "<image file path>";
AlternateView htmlView = AlternateView.CreateAlternateViewFromString(
mail.Body, null, "text/html");
LinkedResource imgLink = new LinkedResource(imgFile, "image/jpg");
imgLink.ContentId = "image1";
imgLink.TransferEncoding = System.Net.Mime.TransferEncoding.Base64;
htmlView.LinkedResources.Add(imgLink);
mail.AlternateViews.Add(htmlView);
/////////////////////////////////////////////////////////////////////
// Configure the SMTP client and send the email.
//
// Configure the SMTP client
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.live.com";
smtp.Credentials = new NetworkCredential(
"myaccount@live.com", "mypassword");
smtp.EnableSsl = true;
// Send the email
smtp.Send(mail);