public override MailContent CreateMailContent() { GraphControl graphControl = CreateControlImpl(); MailContent mailContent = new MailContent(); MemoryStream ms = new MemoryStream(); graphControl.ChartInstance.SaveImage( ms, ChartImageFormat.Png ); ms.Position = 0; LinkedResource imgLink = new LinkedResource(ms, "image/png") { ContentId = "chart1" }; mailContent.Resource = imgLink; mailContent.Message = string.Format( @"Graph image:<br> <img src=""cid:chart1"" width=""{0}"" height=""{1}"" > ", Preprocessor.GraphicsInfo.Size.Width, Preprocessor.GraphicsInfo.Size.Height ); return(mailContent); }
public override MailContent CreateMailContent() { GraphControl graphControl = CreateControlImpl(); MailContent mailContent = new MailContent(); MemoryStream ms = new MemoryStream(); graphControl.ChartInstance.SaveImage( ms, ChartImageFormat.Png ); ms.Position = 0; LinkedResource imgLink = new LinkedResource(ms, "image/png") { ContentId = "chart1" }; mailContent.Resource = imgLink; mailContent.Message = string.Format( @"Graph image:<br> <img src=""cid:chart1"" width=""{0}"" height=""{1}"" > ", Preprocessor.GraphicsInfo.Size.Width, Preprocessor.GraphicsInfo.Size.Height ); return mailContent; }
public override MailContent CreateMailContent() { MailContent mailContent = new MailContent(); string fullHtmlPath = GetResultCommand.GetWebPath(this._htmlPath); string htmlStr = DownloadHtml(fullHtmlPath); string innerBodyHtml = GetInnerBodyHtml(htmlStr); mailContent.Message = string.Format( "<br>Html Report:<br><div>{0}</div>", innerBodyHtml ); return(mailContent); }
public override MailContent CreateMailContent() { MailContent mailContent = new MailContent(); string fullHtmlPath = GetResultCommand.GetWebPath(this._htmlPath); string htmlStr = DownloadHtml(fullHtmlPath); string innerBodyHtml = GetInnerBodyHtml(htmlStr); mailContent.Message = string.Format( "<br>Html Report:<br><div>{0}</div>", innerBodyHtml ); return mailContent; }