class IMailboxIMAP(IMailboxIMAPInfo): (source)
Undocumented
Method | add |
Add a mailbox change listener |
Method | add |
Add the given message to this mailbox. |
Method | destroy |
Called before this mailbox is deleted, permanently. |
Method | expunge |
Remove all messages flagged \Deleted. |
Method | fetch |
Retrieve one or more messages. |
Method | get |
Return the number of messages in this mailbox. |
Method | get |
Return the number of messages with the 'Recent' flag. |
Method | get |
Return the UID of a message in the mailbox |
Method | get |
Return the likely UID for the next message added to this mailbox. |
Method | get |
Return the unique validity identifier for this mailbox. |
Method | get |
Return the number of messages with the 'Unseen' flag. |
Method | is |
Get the read/write status of the mailbox. |
Method | remove |
Remove a mailbox change listener |
Method | request |
Return status information about this mailbox. |
Method | store |
Set the flags of one or more messages. |
Inherited from IMailboxIMAPInfo
:
Method | get |
Return the flags defined in this mailbox |
Method | get |
Get the character which delimits namespaces for in this mailbox. |
Add a mailbox change listener
Parameters | |
listener:Any object which implements IMailboxIMAPListener | An object to add to the set of those which will be notified when the contents of this mailbox change. |
Add the given message to this mailbox.
Parameters | |
message:A file-like object | The RFC822 formatted message |
flags:Any iterable of bytes | The flags to associate with this message |
date:bytes | If specified, the date to associate with this message. |
Returns | |
Deferred | A deferred whose callback is invoked with the message id if the message is added successfully and whose errback is invoked otherwise. |
Raises | |
ReadOnlyMailbox | Raised if this Mailbox is not open for read-write. |
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.
Retrieve one or more messages.
Parameters | |
messages:MessageSet | The identifiers of messages to retrieve information about |
uid:bool | If true, the IDs specified in the query are UIDs; otherwise they are message sequence IDs. |
Returns | |
Any iterable of two-tuples of message sequence numbers and implementors of IMessageIMAP. | Undocumented |
Get the read/write status of the mailbox.
Returns | |
int | A true value if write permission is allowed, a false value otherwise. |
Remove a mailbox change listener
Parameters | |
listener:Any object previously added to and not removed from this mailbox as a listener. | The object to remove from the set of listeners. |
Raises | |
ValueError | Raised when the given object is not a listener for this mailbox. |
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:Any iterable | The status names to return information regarding. The possible values for each name are: MESSAGES, RECENT, UIDNEXT, UIDVALIDITY, UNSEEN. |
Returns | |
dict or Deferred | 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. |
Set the flags of one or more messages.
Parameters | |
messages:A MessageSet object with the list of messages requested | The identifiers of the messages to set the flags of. |
flags:sequence of str | The flags to set, unset, or add. |
mode:-1, 0, or 1 | If mode is -1, these flags should be removed from the specified messages. If mode is 1, these flags should be added to the specified messages. If mode is 0, all existing flags should be cleared and these flags should be added. |
uid:bool | If true, the IDs specified in the query are UIDs; otherwise they are message sequence IDs. |
Returns | |
dict or Deferred | A dict mapping message sequence numbers to sequences of str representing the flags set on the message after this operation has been performed, or a Deferred whose callback will be invoked with such a dict . |
Raises | |
ReadOnlyMailbox | Raised if this mailbox is not open for read-write. |