[Help]: mailbox classes

François Granger fgranger at alussinan.org
Fri Sep 20 13:29:10 EDT 2002


Alex Martelli <aleax at aleax.it> wrote:

> J. Li wrote:
> 
> > Hi,
> > 
> > I am trying to extract a message from a unix mailbox file.
...
> 
> > what is it relationship with email.message classes.
> 
> Not much, intrinsically -- the items in a mailbox object by
> default are rfc822.Message instances.  But you can pass as
> the second argument to the constructor a factory with a
> compatible interface, which should let you get email.Message
> instances instead, if that's what you want.

email does not handle the unix mailbox properly. It sees only the first
message.

I was going the way you suggest by first using mailbox.UnixMailbox, then
i'd like to pass each message given by the next() method to email for
further analysis. But this is way over my current level of understanding
of Python objects and classes. ....

-- 
Une faq de frj: http://faq.jardin.free.fr/, près de l'encyclopédie
http://nature.jardin.free.fr/
MacPython beginners http://francois.granger.free.fr/MacPython/faq/



More information about the Python-list mailing list