Skip to content

Commit 60b03d2

Browse files
committed
gh-148770: Document quoting requirement for IMAP mailbox names with spaces
Add a note to IMAP4.select() documenting that mailbox names containing spaces must be quoted by the caller, e.g. M.select('"my important mail"').
1 parent 8276778 commit 60b03d2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Doc/library/imaplib.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,12 @@ An :class:`IMAP4` instance has the following methods:
519519
(``EXISTS`` response). The default *mailbox* is ``'INBOX'``. If the *readonly*
520520
flag is set, modifications to the mailbox are not allowed.
521521

522+
.. note::
523+
524+
Mailbox names containing spaces must be quoted by the caller.
525+
For example, to select a mailbox named ``my important mail``, use
526+
``M.select('"my important mail"')``.
527+
522528

523529
.. method:: IMAP4.send(data)
524530

0 commit comments

Comments
 (0)