All IMAP4rev1 commands are represented by methods of the same name,
either upper-case or lower-case.
Each command returns a tuple: (type, [data,
...]) where type is usually 'OK' or 'NO',
and data is either the text from the command response, or
mandated results from the command.
Permanently remove deleted items from selected mailbox. Generates an
"EXPUNGE" response for each deleted message. Returned data
contains a list of "EXPUNGE" message numbers in order
received.
List mailbox names in directory matching
pattern. directory defaults to the top-level mail
folder, and pattern defaults to match anything. Returned data
contains a list of "LIST" responses.
List subscribed mailbox names in directory matching pattern.
directory defaults to the top level directory and
pattern defaults to match any mailbox.
Returned data are tuples of message part envelope and data.
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.