admin管理员组文章数量:1278910
I'm writing a Node application which among other things needs to receive email and process it so that it can be rendered in a Web page (as happens in Web mail, list archives, etc.). I've got the receiving part covered with Haraka (). From there to storing the received emails in Mongo is easy, and so long as they're plain text I can display them.
The part I'm missing is handling the rather involved varieties of ways in which email content can e, including alternatives, HTML, attachments, inlined images, and much more. That's a rather steep amount of functionality to have to put together, and I can't seem to find a JS library that will do it for me. Given the number of libraries out there and the speed at which new ones are added, it might just be that I've missed it — so pointers wele!
And failing that, if I were to port an existing library for this over from another language, which one(s) would you remend I look at?
Thanks!
I'm writing a Node application which among other things needs to receive email and process it so that it can be rendered in a Web page (as happens in Web mail, list archives, etc.). I've got the receiving part covered with Haraka (https://github./baudehlo/Haraka). From there to storing the received emails in Mongo is easy, and so long as they're plain text I can display them.
The part I'm missing is handling the rather involved varieties of ways in which email content can e, including alternatives, HTML, attachments, inlined images, and much more. That's a rather steep amount of functionality to have to put together, and I can't seem to find a JS library that will do it for me. Given the number of libraries out there and the speed at which new ones are added, it might just be that I've missed it — so pointers wele!
And failing that, if I were to port an existing library for this over from another language, which one(s) would you remend I look at?
Thanks!
Share Improve this question edited Sep 7, 2011 at 22:25 karlcow 6,9724 gold badges41 silver badges72 bronze badges asked Sep 7, 2011 at 22:03 Robin BerjonRobin Berjon 1,01312 silver badges10 bronze badges3 Answers
Reset to default 4You should check out haraka-couchdb and the other work maxogden is doing.
https://github./maxogden/haraka-couchdb
https://github./maxogden/couchmail
Haraka-CouchDB deals with storing the attachments. At the very least it should tell you how to do it with Mongo too.
At some point I'm hoping to put a simpler layer over the email parser in Haraka, so that you can just see the email contents easily - but that requires a javascript HTML to Text converter. Or I guess you could do it the other way around and convert the Text to HTML.
Im probably a little late responding, But I had a similar requirement for persisting emails in mongo-db. I created this stub of code that gets the body of emails and inserts into mongo, Next iteration is attachments.
The plugin can be found at https://github./jamescowie/haraka-mongo
Check out Kyatchi -> https://github./hamin/kyatchi
hope that helps
本文标签: javascriptEmail processing with NodeJSStack Overflow
版权声明:本文标题:javascript - Email processing with NodeJS - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741258770a2367201.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论