开发者

What is the best library for reliably dealing with attachments from email? [closed]

开发者 https://www.devze.com 2023-01-10 09:04 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 9 years ago.

Improve this question

I have an application and need to write a program that is able to figure out attachments from all kinds of email senders (and MUAs) reliably. PHP doesn't seem开发者_如何转开发 to have a great MIME parser so I was hoping some other languages might.

I've seen the PHP Mail Mime Parser but it's not robust at all and I know (and have confirmed) it doesn't work reliably with all MUAs.

Does anyone know of a more real-world-hardened mail parsing library?

I can use any language, doesn't matter.


How about Perl 5's Email::MIME? Looks like something that will fulfill Your needs, if I understood You correctly.


Python's email module is excellent and includes full support for MIME emails, including incremental parsing. I think the moral here is that you can do this in many languages.

Of course, you should do it in Python.


Perl has several email parsing libraries, choose the one which suits your needs best.


I have had a lot of success using Ruby and the mail gem at http://github.com/mikel/mail this is now the default creator/parser for Rails.

I think you are really going to get answers from people with their preference of language so I think its ultimately a question of preference but we use this gem in the web front end of CloudMailin.

0

精彩评论

暂无评论...
验证码 换一张
取 消