码迷,mamicode.com
首页 > 数据库 > 详细

[同步电子邮件数据库]如何将电子邮件解析到数据库?(How to parse e-mail into database?)

时间:2020-04-14 00:53:46      阅读:105      评论:0      收藏:0      [点我收藏+]

标签:real   www   having   如何   interface   parser   htm   imap   self   

问 题
 

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?)

标签:real   www   having   如何   interface   parser   htm   imap   self   

原文地址:https://www.cnblogs.com/sqlserver-mysql/p/12694958.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!