interface documentation

Undocumented

Method addListener Add a mailbox change listener
Method addMessage 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 getMessageCount Return the number of messages in this mailbox.
Method getRecentCount Return the number of messages with the 'Recent' flag.
Method getUID Return the UID of a message in the mailbox
Method getUIDNext Return the likely UID for the next message added to this mailbox.
Method getUIDValidity Return the unique validity identifier for this mailbox.
Method getUnseenCount Return the number of messages with the 'Unseen' flag.
Method isWriteable Get the read/write status of the mailbox.
Method removeListener Remove a mailbox change listener
Method requestStatus Return status information about this mailbox.
Method store Set the flags of one or more messages.

Inherited from IMailboxIMAPInfo:

Method getFlags Return the flags defined in this mailbox
Method getHierarchicalDelimiter Get the character which delimits namespaces for in this mailbox.
def addListener(listener): (source)

Add a mailbox change listener

Parameters
listener:Any object which implements IMailboxIMAPListenerAn object to add to the set of those which will be notified when the contents of this mailbox change.
def addMessage(message, flags, date): (source)

Add the given message to this mailbox.

Parameters
message:A file-like objectThe RFC822 formatted message
flags:Any iterable of bytesThe flags to associate with this message
date:bytesIf specified, the date to associate with this message.
Returns
DeferredA deferred whose callback is invoked with the message id if the message is added successfully and whose errback is invoked otherwise.
Raises
ReadOnlyMailboxRaised if this Mailbox is not open for read-write.
def destroy(): (source)

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 expunge(): (source)

Remove all messages flagged \Deleted.

Returns
list or DeferredThe list of message sequence numbers which were deleted, or a Deferred whose callback will be invoked with such a list.
Raises
ReadOnlyMailboxRaised if this Mailbox is not open for read-write.
def fetch(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 getMessageCount(): (source)

Return the number of messages in this mailbox.

Returns
intUndocumented
def getRecentCount(): (source)

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

Returns
intUndocumented
def getUID(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(): (source)

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

Returns
intUndocumented
def getUIDValidity(): (source)

Return the unique validity identifier for this mailbox.

Returns
intUndocumented
def getUnseenCount(): (source)

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

Returns
intUndocumented
def isWriteable(): (source)

Get the read/write status of the mailbox.

Returns
intA true value if write permission is allowed, a false value otherwise.
def removeListener(listener): (source)

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
ValueErrorRaised when the given object is not a listener for this mailbox.
def requestStatus(names): (source)

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 iterableThe status names to return information regarding. The possible values for each name are: MESSAGES, RECENT, UIDNEXT, UIDVALIDITY, UNSEEN.
Returns
dict or DeferredA 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.
def store(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.