Search code examples
pythonemailimap

Good resources to learn IMAP programming


I'm looking for comprehensive tutorials on how to interface with an IMAP server from python. However, the only thing out there seems to be the RFC definition itself.

Are there any good textual or video tutorials to illustrate IMAP protocol at at high level? Questions such as what's the data model? what attributes can email messages have? What kind of operations are efficient? Etc.


Solution

  • As the comment by Pedro says, you will almost certainly want to use imaplib. Here are 2 good and extensive contributions by Doug Hellmann on that library's use:

    http://www.doughellmann.com/PyMOTW/imaplib/index.html#module-imaplib

    and

    http://doughellmann.com/2007/10/01/working-with-imap-and-icalendar.html

    The 2nd one is more about icalendar stuff, but it covers some imap ground that the 1st one doesn't.

    Mike