阅读在C#中的MBOX文件 [英] Reading an mbox file in C#

查看:252
本文介绍了阅读在C#中的MBOX文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的一个工作人员已经失去了他的邮箱,但幸运的是有他的电子邮件在MBOX格式的转储。我需要以某种方式获得MBOX文件中的所有信息,并将其喷射到我们的技术支持数据库(它的自定义工具有没有可用的导入工具)。

One of our staff members has lost his mailbox but luckily has a dump of his email in mbox format. I need to somehow get all the messages inside the mbox file and squirt them into our tech support database (as its a custom tool there are no import tools available).

我已经找到 SharpMimeTools 这打破了一条消息,但不允许你通过在MBOX文件一大堆的消息迭代。

I've found SharpMimeTools which breaks down a message but not allow you to iterate through a bunch of messages in a mbox file.

有谁知道一个体面的解析器,多数民众赞成开放,而无需学习RFC写一个出来?

Does anyone know of a decent parser thats open without having to learn the RFC to write one out?

推荐答案

我不知道任何分析器,但MBOX真的是一个非常简单的格式。一个新的电子邮件就开始开始从(从+空格)线和一个空行被附加到每个邮件的结尾。如果有任何occurence从在电子邮件本身一行的开始,这是引用了(在前面加上一个'>')

I don't know any parser, but mbox is really a very simple format. A new email begins on lines starting with "From " (From+Space) and an empty line is attached to the end of each mail. Should there be any occurence of "From " at the beginning of a line in the email itself, this is quoted out (by prepending a '>').

另请参阅维基百科上关于该主题作品。

这篇关于阅读在C#中的MBOX文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆