Visits a MimeMessage and generates HTML suitable to be rendered by a browser control.
Наследование: MimeKit.MimeVisitor
Пример #1
0
		void Render (MimeMessage message)
		{
			var tmpDir = Path.Combine (Path.GetTempPath (), message.MessageId);
			var visitor = new HtmlPreviewVisitor (tmpDir);

			Directory.CreateDirectory (tmpDir);

			message.Accept (visitor);

			DisplayHtml (visitor.HtmlBody);
			DisplayAttachments (visitor.Attachments);
		}
Пример #2
0
		void Render (WebBrowser browser, MimeMessage message)
		{
			var tmpDir = Path.Combine (Path.GetTempPath (), message.MessageId);
			var visitor = new HtmlPreviewVisitor (tmpDir);

			Directory.CreateDirectory (tmpDir);

			message.Accept (visitor);

			browser.DocumentText = visitor.HtmlBody;
		}