Parsing mime multipart/alternative emails for the message body

Barry A. Warsaw barry at
Fri Feb 8 17:38:35 EST 2002

>>>>> "JPM" == Joao Prado Maia <JMaia at> writes:

    JPM> I'm trying to parse mime based emails to get the message
    JPM> body, but I didn't have much luck on trying to find a way.

You might want to give Python 2.2's email package[*] a try.  It is
specifically designed to do all the things you'd want to do to and on
an email message, including parse a text file into an object model,


[*] Or for older Python's look at the distutils-able mimelib/email
package at:

The version in CVS has some much better support for multibyte
character sets.

More information about the Python-list mailing list