admin管理员组文章数量:1201804
Does anybody know of any JavaScript libraries that will read/parse a microsoft .msg file. I am writing a system that requires a viewer to dispay .msg files that have been stored on a server. I will probably also have to do .eml in the future too. I am not using framework or ASP. the project is HTML/CSS/Javascript+JQuery only.
I would need to extract only e-mail addresses for recipients / sender, subject, attachments (file names not the actual files), body (text & html), date sent etc.
Does anybody know of any JavaScript libraries that will read/parse a microsoft .msg file. I am writing a system that requires a viewer to dispay .msg files that have been stored on a server. I will probably also have to do .eml in the future too. I am not using .net framework or ASP. the project is HTML/CSS/Javascript+JQuery only.
I would need to extract only e-mail addresses for recipients / sender, subject, attachments (file names not the actual files), body (text & html), date sent etc.
Share Improve this question edited Oct 13, 2015 at 6:34 ROMANIA_engineer 56.6k30 gold badges208 silver badges205 bronze badges asked Mar 25, 2013 at 11:37 WongadobWongadob 1411 gold badge1 silver badge4 bronze badges 2 |4 Answers
Reset to default 10The msg.reader library seems to do the job.
You will need a MSG and/or EML converter library. I've used Mailbee.NET with success in the past, but Aspose or any other commercial library should work the same. Of course you could always code your own MSG parser by following the specifications, but wouldn't you rather be focused on your web solution?
Once you have the library - just wrap it up in a service facade and build AJAX requests in JS to retrieve the model data for display using your UI framework. You will need some server page handler for handling these dynamic AJAX requests - node.js, ASPX, JSP, PHP, etc.
As a side note - it would be very inefficient to pull down the entire MSG to the client just to retrieve part of the metadata. Consider an MSG with 50MB worth of attachments - if you only need the filenames - you're application will be useless/slow until it downloads all 50MB. I don't think the browser (or users) would like that.
I believe pure JS is not possible but with the help of node and linux on the server side we can.
It would be great if nodemailer and/or msg.reader library could support HTML emails in msg format though.
You can also use Redemption (I am its author) and its RDOSession.GetMessageFromMsgFile method. It is accessible in JavaScript (IE only), Java (through COM bridge) and any .Net language.
本文标签: jqueryParsing msg files in JavaScriptStack Overflow
版权声明:本文标题:jquery - Parsing .msg files in JavaScript - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738593673a2101661.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
mapitool
via github.com/aquasync/ruby-msg or stackoverflow.com/a/30445067/6163262 – whodini9 Commented Sep 28, 2020 at 20:13