How do I get a mimetools.Message object from a mailbox.UnixMailbox object?

Steve Holden sholden at holdenweb.com
Sun Jan 7 20:34:31 EST 2001


Paul Moore <gustav at morpheus.demon.co.uk> wrote in message
news:vgmh5tkv7h0blpv6j8t1soiipoaum64u7v at 4ax.com...
> I'm parsing a Unix mbox format file in Python. No problem, that's what
> the mailbox module does...
>
> The problem is, mbx.next() returns a rfc822.Message instance - and my
> mailbox contains MIME-encoded messages with attachments. How do I get
> from the rfc822.Message instance to a mimetools.Message instance?
>
> Thanks,
> Paul Moore
>
The mimecntl module was invented to overcome the impedance mismatch between
mailbox and rfc822, and does so quite well, so you may wish to consider
using that instead.  I've used it fairly extensively and only had one
problem with it (which I'm debgging between times, but haven't looked at
lately).

IRIC my copy came from the Vaults of Parnassus,
http://www.vex.net/parnassus/ in the Internet section.

regards
 Steve





More information about the Python-list mailing list