imaplib.IMAP4.subscribe()

IMAP4.subscribe(mailbox) Subscribe to new mailbox.

imaplib.IMAP4.store()

IMAP4.store(message_set, command, flag_list) Alters flag dispositions for messages in mailbox. command is specified by section 6.4.6 of RFC 2060 as being one of “FLAGS”, “+FLAGS”, or “-FLAGS”, optionally with a suffix of ”.SILENT”. For example, to set the delete flag on all messages: typ, data = M.search(None, 'ALL') for num in data[0].split(): M.store(num, '+FLAGS', '\\Deleted') M.expunge()

imaplib.IMAP4.status()

IMAP4.status(mailbox, names) Request named status conditions for mailbox.

imaplib.IMAP4.starttls()

IMAP4.starttls(ssl_context=None) Send a STARTTLS command. The ssl_context argument is optional and should be a ssl.SSLContext object. This will enable encryption on the IMAP connection. Please read Security considerations for best practices. New in version 3.2. Changed in version 3.4: The method now supports hostname check with ssl.SSLContext.check_hostname and Server Name Indication (see ssl.HAS_SNI).

imaplib.IMAP4.sort()

IMAP4.sort(sort_criteria, charset, search_criterion[, ...]) The sort command is a variant of search with sorting semantics for the results. Returned data contains a space separated list of matching message numbers. Sort has two arguments before the search_criterion argument(s); a parenthesized list of sort_criteria, and the searching charset. Note that unlike search, the searching charset argument is mandatory. There is also a uid sort command which corresponds to sort the way that uid searc

imaplib.IMAP4.socket()

IMAP4.socket() Returns socket instance used to connect to server.

imaplib.IMAP4.shutdown()

IMAP4.shutdown() Close connection established in open. This method is implicitly called by IMAP4.logout(). You may override this method.

imaplib.IMAP4.setquota()

IMAP4.setquota(root, limits) Set the quota root‘s resource limits. This method is part of the IMAP4 QUOTA extension defined in rfc2087.

imaplib.IMAP4.setannotation()

IMAP4.setannotation(mailbox, entry, attribute[, ...]) Set ANNOTATIONs for mailbox. The method is non-standard, but is supported by the Cyrus server.

imaplib.IMAP4.setacl()

IMAP4.setacl(mailbox, who, what) Set an ACL for mailbox. The method is non-standard, but is supported by the Cyrus server.