Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mailbox multipart

1 view
Skip to first unread message

janwillem

unread,
Apr 13, 2010, 5:54:03 PM4/13/10
to
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?
Thanks janwillem

Tim Roberts

unread,
Apr 14, 2010, 2:26:37 AM4/14/10
to

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, ti...@probo.com
Providenza & Boekelheide, Inc.

janwillem

unread,
Apr 14, 2010, 3:45:24 AM4/14/10
to
On Apr 14, 8:26 am, Tim Roberts <t...@probo.com> wrote:

> janwillem <jwevand...@xs4all.nl> 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, t...@probo.com
> Providenza & Boekelheide, Inc.

Thanks Tim,
There you have a point, after I find it is a multipart message I dive
into it recursively and so loose the outer header info. That was all.

0 new messages