Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Decoding MIME (HTML+Attachments) [closed]

I'm planning to write an application that should handle incoming mails. Basically it will act more like a ticketing system than a webmail, so I'm only interested in receiving emails, and not sending them.

I have made a simple prototype that downloads mails and displays the text with downloadable attachments in a web page, but handling mails from Outlook and others is more complicated. I have looked at some of the open source ticketing systems out there, but most of the code is tied to the system and is hard to separate.

Is there a library that understands "rich" mail and makes this job simpler? Preferably in Python, Java, Ruby or Perl. I'm also open to suggestions for any command line mail clients that can be used for this, since the system will not receive large amounts of mail and can afford to launch external processes.

Edit:

I know about the standard mail libraries in Python and Java and can handle the mail itself, but I'm looking for a library that can help me with the "rich" emails created by Outlook/Thunderbird that contains formatting and inline images.

like image 685
MH. Avatar asked Nov 05 '22 13:11

MH.


1 Answers

There are several email-handling packages in the Python standard library. I haven't worked with them very much, so I'm not sure whether they do quite what you intend, but if you haven't already I would suggest taking a look at e.g. the email package.

If you're looking for something higher-level than that, I'm sure there are third-party libraries available.

like image 77
David Z Avatar answered Nov 12 '22 11:11

David Z