imaplib.IMAP4.status()

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

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.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.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.subscribe()

IMAP4.subscribe(mailbox) Subscribe to new mailbox.

imaplib.IMAP4.send()

IMAP4.send(data) Sends data to the remote server. You may override this method.

imaplib.IMAP4.search()

IMAP4.search(charset, criterion[, ...]) Search mailbox for matching messages. charset may be None, in which case no CHARSET will be specified in the request to the server. The IMAP protocol requires that at least one criterion be specified; an exception will be raised when the server returns an error. charset must be None if the UTF8=ACCEPT capability was enabled using the enable() command. Example: # M is a connected IMAP4 instance... typ, msgnums = M.search(None, 'FROM', '"LDJ"') # or: ty

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.select()

IMAP4.select(mailbox='INBOX', readonly=False) Select a mailbox. Returned data is the count of messages in mailbox (EXISTS response). The default mailbox is 'INBOX'. If the readonly flag is set, modifications to the mailbox are not allowed.