Networking and Internet Modules

imaplib

IMAP clients work with server-side mailboxes, flags and message retrieval. Message sequence numbers can change; use UIDs when stable message identifiers within a mailbox validity period are needed. IMAP4_SSL uses TLS. The example checks the interface without creating a connection.

Formal Syntax & Structure

python syntaxpython
import imaplib

Return Value

module

Module namespace available through import; import is a statement, not a value-returning expression.

Working Example

Example Snippetpython
from imaplib import IMAP4, IMAP4_SSLprint(issubclass(IMAP4_SSL, IMAP4))
Python Reference