[同步电子邮件数据库]如何将电子邮件解析到数据库?(How to parse e-mail into database?)
Posted sqlserver-mysql
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[同步电子邮件数据库]如何将电子邮件解析到数据库?(How to parse e-mail into database?)相关的知识,希望对你有一定的参考价值。
Still sometime I‘m desperately searching for some community of developers which is dealing with the parsing of incoming email and storing its structure in the database.
Quoting Mail2db developers:
Different from traditional mail archive, the Mail2db engine can convert email into real database records stored within a RDMB architecture database.
Here is the list of some language specific implementation of IMAP labrary which is used as a main tool in the development of such interfaces
- php: http://php.net/manual/en/book.imap.php
- PYTHON: http://docs.python.org/library/imaplib.html
- Perl: https://metacpan.org/pod/Net::IMAP
- C++: http://www.example-code.com/vcpp/imap.asp
But even having these libraries the main problem still persists! That is to parse the email correctly into database.
Because, generally for parsing an email into database you need to do much more than it is done by the default classes. In a sense need to validate the email structure, to distinguish correctly the destinations, attachments, inline parts and to process the body of some parts with respect to the correct encoding.
In internet you may find some commercial (so automatically no applicable to opensource) and homemade solutions of the problem:
- http://www.email2db.com/
- http://www.mail2db.com/
Any ideas, links, discussions or books about the topic are very welcome!
Here‘s an open source project that does it: http://www.manitou-mail.org
The db engine is PostgreSQL and the mail messages are parsed into this model (diagram)
The parser itself is a Perl script that can be used independently of the rest of the software (GUI).
本文地址:IT屋 » 如何将电子邮件解析到数据库?
以上是关于[同步电子邮件数据库]如何将电子邮件解析到数据库?(How to parse e-mail into database?)的主要内容,如果未能解决你的问题,请参考以下文章