imaplib.IMAP4.delete()

IMAP4.delete(mailbox) Delete old mailbox named mailbox.

imaplib.IMAP4.debug

IMAP4.debug Integer value to control debugging output. The initialize value is taken from the module variable Debug. Values greater than three trace each command.

imaplib.IMAP4.create()

IMAP4.create(mailbox) Create new mailbox named mailbox.

imaplib.IMAP4.copy()

IMAP4.copy(message_set, new_mailbox) Copy message_set messages onto end of new_mailbox.

imaplib.IMAP4.close()

IMAP4.close() Close currently selected mailbox. Deleted messages are removed from writable mailbox. This is the recommended command before LOGOUT.

imaplib.IMAP4.check()

IMAP4.check() Checkpoint mailbox on server.

imaplib.IMAP4.authenticate()

IMAP4.authenticate(mechanism, authobject) Authenticate command — requires response processing. mechanism specifies which authentication mechanism is to be used - it should appear in the instance variable capabilities in the form AUTH=mechanism. authobject must be a callable object: data = authobject(response) It will be called to process server continuation responses; the response argument it is passed will be bytes. It should return bytes data that will be base64 encoded and sent to the se

imaplib.IMAP4.append()

IMAP4.append(mailbox, flags, date_time, message) Append message to named mailbox.

imaplib.IMAP4.abort

exception IMAP4.abort IMAP4 server errors cause this exception to be raised. This is a sub-class of IMAP4.error. Note that closing the instance and instantiating a new one will usually allow recovery from this exception.

imaplib.IMAP4

class imaplib.IMAP4(host='', port=IMAP4_PORT) This class implements the actual IMAP4 protocol. The connection is created and protocol version (IMAP4 or IMAP4rev1) is determined when the instance is initialized. If host is not specified, '' (the local host) is used. If port is omitted, the standard IMAP4 port (143) is used. The IMAP4 class supports the with statement. When used like this, the IMAP4 LOGOUT command is issued automatically when the with statement exits. E.g.: >>> from i