twisted.mail.test.test_imap.SimpleMailbox
class documentationtwisted.mail.test.test_imap
(View In Hierarchy)
Known subclasses: twisted.mail.test.test_imap.SlowMailbox
Implements interfaces: twisted.mail.interfaces.ICloseableMailboxIMAP, twisted.mail.interfaces.IMailboxIMAP, twisted.mail.interfaces.IMailboxIMAPInfo
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. |
Return the unique validity identifier for this mailbox.
Returns | (type: int ) |
Return the likely UID for the next message added to this mailbox.
Returns | (type: int ) |
Get the read/write status of the mailbox.
Returns | A true value if write permission is allowed, a false value otherwise. (type: int ) |
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.
Get the character which delimits namespaces for in this mailbox.
Returns | (type: bytes ) |
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.
Parameters | names | The status names to return information regarding. The possible values for each name are: MESSAGES, RECENT, UIDNEXT, UIDVALIDITY, UNSEEN. (type: Any iterable) |
Returns | A 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 ) |
Add the given message to this mailbox.
Parameters | message | The RFC822 formatted message (type: A file-like object) |
flags | The flags to associate with this message (type: Any iterable of bytes ) | |
date | If specified, the date to associate with this message. (type: bytes ) | |
Returns | A deferred whose callback is invoked with the message id if the message is
added successfully and whose errback is invoked otherwise. (type: Deferred ) | |
Raises | ReadOnlyMailbox | Raised if this Mailbox is not open for read-write. |
Close this mailbox.
Returns | A Deferred
which fires when this mailbox has been closed, or None if the mailbox can
be closed immediately. |