[同步电子邮件数据库]如何将电子邮件解析到数据库?(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?)的主要内容,如果未能解决你的问题,请参考以下文章

如何解析来自 Google 快讯的数据?

我如何跟踪退回的电子邮件?

将SQLServer数据同步到MySQL 用啥方法

如何在解析云代码中将文本文件附加到山魈邮件?

如何使用 Cloud Functions 接收和解析电子邮件?

将SQLServer数据同步到MySQL 用啥方法