imaplib implements a client for communicating with Internet Message Access Protocol (IMAP) version 4 servers. The IMAP protocol defines a set of commands sent to the server and the responses delivered back to the client. Most of the commands are available as methods of the IMAP4 object used to communicate with the server.
The actual post is too long to publish on the blog, so click through if you’re interested. I’m a little new to IMAP, so if you have feedback on the examples please post comments here.