Known subclasses: twisted.mail.test.test_imap.SlowMailbox

Implements interfaces: twisted.mail.interfaces.ICloseableMailboxIMAP, twisted.mail.interfaces.IMailboxIMAP, twisted.mail.interfaces.IMailboxIMAPInfo

Undocumented
Method __init__ Undocumented
Method getFlags Return the flags defined in this mailbox
Method getUIDValidity Return the unique validity identifier for this mailbox.
Method getUIDNext Return the likely UID for the next message added to this mailbox.
Method getMessageCount Return the number of messages in this mailbox.
Method getRecentCount Return the number of messages with the 'Recent' flag.
Method getUnseenCount Return the number of messages with the 'Unseen' flag.
Method isWriteable Get the read/write status of the mailbox.
Method destroy Called before this mailbox is deleted, permanently.
Method getHierarchicalDelimiter Get the character which delimits namespaces for in this mailbox.
Method requestStatus Return status information about this mailbox.
Method addMessage Add the given message to this mailbox.
Method expunge Remove all messages flagged \Deleted.
Method close Close this mailbox.
def __init__(self):
Undocumented
def getFlags(self):

Return the flags defined in this mailbox

Flags with the \ prefix are reserved for use as system flags.

ReturnsA list of the flags that can be set on messages in this mailbox. (type: list of str)
def getUIDValidity(self):

Return the unique validity identifier for this mailbox.

Returns (type: int)
def getUIDNext(self):

Return the likely UID for the next message added to this mailbox.

Returns (type: int)
def getMessageCount(self):

Return the number of messages in this mailbox.

Returns (type: int)
def getRecentCount(self):

Return the number of messages with the 'Recent' flag.

Returns (type: int)
def getUnseenCount(self):

Return the number of messages with the 'Unseen' flag.

Returns (type: int)
def isWriteable(self):

Get the read/write status of the mailbox.

ReturnsA true value if write permission is allowed, a false value otherwise. (type: int)
def destroy(self):

Called before this mailbox is deleted, permanently.

If necessary, all resources held by this mailbox should be cleaned up here. This function _must_ set the \Noselect flag on this mailbox.

def getHierarchicalDelimiter(self):

Get the character which delimits namespaces for in this mailbox.

Returns (type: bytes)
def requestStatus(self, names):

Return status information about this mailbox.

Mailboxes which do not intend to do any special processing to generate the return value, statusRequestHelper can be used to build the dictionary by calling the other interface methods which return the data for each name.

ParametersnamesThe status names to return information regarding. The possible values for each name are: MESSAGES, RECENT, UIDNEXT, UIDVALIDITY, UNSEEN. (type: Any iterable)
ReturnsA dictionary containing status information about the requested names is returned. If the process of looking this information up would be costly, a deferred whose callback will eventually be passed this dictionary is returned instead. (type: dict or Deferred)
def addMessage(self, message, flags, date=None):

Add the given message to this mailbox.

ParametersmessageThe RFC822 formatted message (type: A file-like object)
flagsThe flags to associate with this message (type: Any iterable of bytes)
dateIf specified, the date to associate with this message. (type: bytes)
ReturnsA deferred whose callback is invoked with the message id if the message is added successfully and whose errback is invoked otherwise. (type: Deferred)
RaisesReadOnlyMailboxRaised if this Mailbox is not open for read-write.
def expunge(self):

Remove all messages flagged \Deleted.

ReturnsThe list of message sequence numbers which were deleted, or a Deferred whose callback will be invoked with such a list. (type: list or Deferred)
RaisesReadOnlyMailboxRaised if this Mailbox is not open for read-write.
def close(self):

Close this mailbox.

ReturnsA Deferred which fires when this mailbox has been closed, or None if the mailbox can be closed immediately.
API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.