public static void SendHTMLEmail(Page p, string to, string subject, string content, System.Drawing.Image img)
{
MailMessage message = new MailMessage();
message.IsBodyHtml = true;
message.From = new MailAddress("myemail@gmail.com");
message.To.Add(new MailAddress(to));
//message.CC.Add(new MailAddress("carboncopy@foo.bar.com"));
message.Subject = subject;
message.Body = content;
AlternateView htmlBody = AlternateView.CreateAlternateViewFromString(content, Encoding.UTF8, "text/html");
Stream s = new MemoryStream();
//s.re
LinkedResource pic = img; (Cannot assign an image to pic)
由于pic需要一个流。我不知道如何将图像读取到流中。
请帮忙。