loading folder list from my mailbox in python

Mike Driscoll kyosohma at gmail.com
Wed May 7 09:07:25 EDT 2008


On May 7, 1:15 am, ris... at students.iiit.ac.in wrote:
> Hey everyone,
> I want to print the folder list of my mailbox using python (IMAP4), and
> with hierarchy, i.e. it should print all the names of the folders of my
> mailbox and the folders within them.
> Can anyone please help me with this.

Without knowing the backend, it's mostly a shot in the dark. Oh well.
I did some Google-Fu (which you would be wise to learn) and found the
following:

http://www.devshed.com/c/a/Python/Python-Email-Libraries-part-2-IMAP/
http://www.example-code.com/python/imap.asp
http://pypi.python.org/pypi/imap-utils/0.3
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52299

I think at least one of those will get you started. If you're talking
about communicating with Exchange, then you may have to use some win32
or ctypes methods.

Mike



More information about the Python-list mailing list