def select_folder_and_parse(self, folder, readonly=False):
"""Set the current folder on the server.
Future calls to methods such as search and fetch will act on
the selected folder.
Returns a dictionary containing the ``SELECT`` response. At least
the ``EXISTS``, ``FLAGS`` and ``RECENT`` keys are guaranteed
to exist. An example::
{'EXISTS': 3,
'FLAGS': ('\\Answered', '\\Flagged', '\\Deleted', ... ),
'RECENT': 0,
'PERMANENTFLAGS': ('\\Answered', '\\Flagged', '\\Deleted', ... ),
'READ-WRITE': True,
'UIDNEXT': 11,
'UIDVALIDITY': 1239278212}
"""
self._command_and_check('select',
self._normalise_folder(folder),
readonly)
untagged = self._imap.untagged_responses
return self._process_select_response(from_bytes(untagged))
评论列表
文章目录