pymap.exceptions
¶
Module containing the general exceptions that may be used by pymap.
- exception pymap.exceptions.ResponseError[source]¶
The base exception for all custom errors that are used to generate a response to an IMAP command.
- exception pymap.exceptions.CloseConnection[source]¶
Raised when the connection should be closed immediately after sending the provided response.
- exception pymap.exceptions.NotSupportedError(msg='Operation not supported.')[source]¶
Raised when an action is taken that might be syntactically valid, but is not supported by the server or backend.
- Parameters:
msg (str)
- Return type:
None
- exception pymap.exceptions.TemporaryFailure(msg)[source]¶
The operation failed, but may succeed if tried again. The
[INUSE]
response code is added to the response.- Parameters:
msg (str)
- Return type:
None
- exception pymap.exceptions.SearchNotAllowed(key)[source]¶
The
SEARCH
command contained a search key that could not be executed by the mailbox.- Parameters:
key (SearchKey) – The search key that failed.
- Return type:
None
- exception pymap.exceptions.InvalidAuth(msg='Invalid authentication credentials.')[source]¶
The
LOGIN
orAUTHENTICATE
commands received credentials that the IMAP backend has rejected.- Parameters:
msg (str)
- Return type:
None
- exception pymap.exceptions.AuthorizationFailure(msg='Authorization failed.')[source]¶
The credentials in
LOGIN
orAUTHENTICATE
were authenticated but failed to authorize as the requested identity.- Parameters:
msg (str)
- Return type:
None
- exception pymap.exceptions.NotAllowedError(msg='Operation not allowed.')[source]¶
The operation is not allowed due to access controls.
- Parameters:
msg (str)
- Return type:
None
- exception pymap.exceptions.IncompatibleData(msg='Incompatible mailbox data.')[source]¶
The
LOGIN
orAUTHENTICATE
command could not succeed because the detected mailbox data was not in a compatible format.- Parameters:
msg (str)
- Return type:
None
- exception pymap.exceptions.MailboxError(mailbox, message, code=None)[source]¶
Parent exception for errors related to a mailbox.
- Parameters:
mailbox (str | None) – The name of the mailbox.
message (bytes) – The response message for the error.
code (ResponseCode | None) – Optional response code for the error.
- Return type:
None
- exception pymap.exceptions.MailboxNotFound(mailbox, *, try_create=False)[source]¶
The requested mailbox was not found.
- exception pymap.exceptions.MailboxConflict(mailbox)[source]¶
The mailbox cannot be created or renamed because of a naming conflict with another mailbox.
- Parameters:
mailbox (str) – The name of the mailbox.
- Return type:
None
- exception pymap.exceptions.MailboxHasChildren(mailbox)[source]¶
The mailbox cannot be deleted because there are other inferior hierarchical mailboxes below it.
- Parameters:
mailbox (str) – The name of the mailbox.
- Return type:
None
- exception pymap.exceptions.MailboxReadOnly(mailbox=None)[source]¶
The mailbox is opened read-only and the requested operation is not allowed.
- Parameters:
mailbox (str | None) – The name of the mailbox.
- Return type:
None
- exception pymap.exceptions.AppendFailure(mailbox, message, code=None)[source]¶
The mailbox append operation failed.
- Parameters:
mailbox (str | None)
message (bytes)
code (ResponseCode | None)
- Return type:
None