mailbox multipart

Tim Roberts timr at
Wed Apr 14 08:26:37 CEST 2010

janwillem <jwevandijk at> wrote:
>I am trying to analyze mailboxes using an iterator:
>    for key, message in mbox.iteritems():
>When message is a simple mail message['date']  results the date.
>When, however, it is a multipart message this results in None. How can
>you full proof get the "date", "from" and "to" of of a multipart mail
>using python?

Perhaps you should post your code.  There's no particular reason why you
should see this.  The mailbox iterator should return the outer multipart
container, which has the headers.
Tim Roberts, timr at
Providenza & Boekelheide, Inc.

More information about the Python-list mailing list