class documentation

A mailbox that cannot be closed.

Method __init__ Undocumented
Method addMessage Add a message to the mailbox.
Method destroy Destroy this mailbox.
Method expunge Delete messages marked for deletion.
Method fetch Retrieve one or more messages.
Method getFlags The flags
Method getHierarchicalDelimiter Return the hierarchical delimiter.
Method getMessageCount The number of messages.
Method getRecentCount The recent messages.
Method getUID Return the UID of a message in the mailbox
Method getUIDNext The next UID.
Method getUIDValidity The UID validity value.
Method getUnseenCount The recent messages.
Method isWriteable The recent messages.
Method requestStatus Return the mailbox's status.
Method store Set the flags of one or more messages.
Class Variable closed Undocumented
Class Variable flags Undocumented
Class Variable messages Undocumented
Class Variable mUID Undocumented
Class Variable rw Undocumented
Instance Variable addListener Add a mailbox change listener
Instance Variable listeners Undocumented
Instance Variable removeListener Remove a mailbox change listener
def __init__(self): (source)

Undocumented

def addMessage(self, message, flags, date=None): (source)

Add a message to the mailbox.

Parameters
messageThe message body.
flagsThe message flags.
dateThe message date.
Returns
A Deferred that fires when the message has been added.
def destroy(self): (source)

Destroy this mailbox.

def expunge(self): (source)

Delete messages marked for deletion.

Returns
A list of deleted message IDs.
def fetch(self, messages, uid): (source)

Retrieve one or more messages.

Parameters
messages:MessageSetThe identifiers of messages to retrieve information about
uid:boolIf 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
def getFlags(self): (source)

The flags

Returns
A sequence of flags.
def getHierarchicalDelimiter(self): (source)

Return the hierarchical delimiter.

Returns
The delimiter.
def getMessageCount(self): (source)

The number of messages.

Returns
The number.
def getRecentCount(self): (source)

The recent messages.

Returns
The number.
def getUID(self, message): (source)

Return the UID of a message in the mailbox

Parameters
message:intThe message sequence number
Returns
intThe UID of the message.
def getUIDNext(self): (source)

The next UID.

Returns
The UID.
def getUIDValidity(self): (source)

The UID validity value.

Returns
The value.
def getUnseenCount(self): (source)

The recent messages.

Returns
The number.
def isWriteable(self): (source)

The recent messages.

Returns
Whether or not the mailbox is writable.
def requestStatus(self, names): (source)

Return the mailbox's status.

Parameters
namesThe status items to include.
Returns
A dict of status data.
def store(self, messages, flags, mode, uid): (source)

Set the flags of one or more messages.

Parameters
messages:A MessageSet object with the list of messages requestedThe identifiers of the messages to set the flags of.
flags:sequence of strThe flags to set, unset, or add.
mode:-1, 0, or 1If 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:boolIf true, the IDs specified in the query are UIDs; otherwise they are message sequence IDs.
Returns
dict or DeferredA 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
ReadOnlyMailboxRaised if this mailbox is not open for read-write.

Undocumented

flags: tuple[str, ...] = (source)

Undocumented

Undocumented

Undocumented

Undocumented

addListener = (source)

Add a mailbox change listener

Parameters
listenerAn object to add to the set of those which will be notified when the contents of this mailbox change.
listeners: list = (source)

Undocumented

removeListener = (source)

Remove a mailbox change listener

Parameters
listenerThe object to remove from the set of listeners.
Raises
ValueErrorRaised when the given object is not a listener for this mailbox.