Demand email with a Form based on Google kernel and the effect of the display and use a mailbox mail the same
Google kernel I introduced cefSharp package
But don't know if the show in the form and mail to effect and open the mail with web page display effect is same
CodePudding user response:
That is to say if with form shows the eml file types and show the effect of the same request and email clientCodePudding user response:
You are using the cefsharp, simply embedded do web page version of the pageCodePudding user response:
I have will be sent to the code for everyone to do a referenceI am using is based on the Google kernel show so CefSharp introduces a Nuget package
I'm from local loading eml file save as an HTML part
Then he placed the HTML file display on the form page panelControl
Mail the information such as the recipient of the sender through MimeMessage class of objects to obtain
String path=AppDomain. CurrentDomain. BaseDirectory + "test email. Eml";
Stream, Stream=File. OpenRead (path);
The MimeMessage message=MimeMessage. Load (stream);
Stream. The Close ();
LabelControl3. Text=message. From the ToString ();
LabelControl4. Text=message. To. The ToString ();
String savaPath=AppDomain. CurrentDomain. BaseDirectory + "test email. HTML";
File. The Delete (savaPath);
File. AppendAllText (savaPath, message. HtmlBody, Encoding UTF8);
ChromiumWebBrowser web=new ChromiumWebBrowser (savaPath);
Web. The Dock=DockStyle. The Fill;
Enclosing panelControl2. Controls. The Add (web);
CodePudding user response:
Nuget "eml viewer"Or Google "c # eml viewer"
Of course most of the charge, but it doesn't matter, as long as it's not too expensive, can let you company buy
https://www.nuget.org/packages/Document.Viewer/
https://www.nuget.org/packages/GroupDocs.Viewer/
If you really don't want to buy, can write their own related information Google "eml prase H5" or "eml XSLT HTML" related items