Python imaplib Module
Example
Verify IMAP client class is available (no network connection):
import imaplib
print(hasattr(imaplib, "IMAP4"))
Try it Yourself »
Definition and Usage
The imaplib module defines classes to access mail over IMAP4.
Use it to connect to IMAP servers, list mailboxes, and fetch messages. This example avoids networking for stable output.
Members
Member | Description |
---|---|
IMAP4 | IMAP4 client class. |
IMAP4_SSL | IMAP4 client class over SSL. |
Internaldate2tuple() | Parse INTERNALDATE to a time tuple. |
Time2Internaldate() | Convert date/time to INTERNALDATE format. |