interface documentation

class twisted.mail.interfaces.IMailboxIMAP(IMailboxIMAPInfo): (source)

View In Hierarchy

Undocumented

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 getUID Return the UID of a message in the 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 requestStatus Return status information about this mailbox.
Method addListener Add a mailbox change listener
Method removeListener Remove a mailbox change listener
Method addMessage Add the given message to this mailbox.
Method expunge Remove all messages flagged \Deleted.
Method fetch Retrieve one or more messages.
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 getUIDValidity(): (source)

Return the unique validity identifier for this mailbox.

ReturnsUndocumented (type: int)
def getUIDNext(): (source)

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

ReturnsUndocumented (type: int)
def getUID(message): (source)

Return the UID of a message in the mailbox

ParametersmessageThe message sequence number (type: int)
ReturnsThe UID of the message. (type: int)
def getMessageCount(): (source)

Return the number of messages in this mailbox.

ReturnsUndocumented (type: int)
def getRecentCount(): (source)

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

ReturnsUndocumented (type: int)
def getUnseenCount(): (source)

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

ReturnsUndocumented (type: int)
def isWriteable(): (source)

Get the read/write status of the mailbox.

ReturnsA true value if write permission is allowed, a false value otherwise. (type: int)
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 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.

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

Add a mailbox change listener

ParameterslistenerAn object to add to the set of those which will be notified when the contents of this mailbox change. (type: Any object which implements IMailboxIMAPListener)
def removeListener(listener): (source)

Remove a mailbox change listener

ParameterslistenerThe object to remove from the set of listeners. (type: Any object previously added to and not removed from this mailbox as a listener.)
RaisesValueErrorRaised when the given object is not a listener for this mailbox.
def addMessage(message, flags, date): (source)

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

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 fetch(messages, uid): (source)

Retrieve one or more messages.

ParametersmessagesThe identifiers of messages to retrieve information about (type: MessageSet)
uidIf true, the IDs specified in the query are UIDs; otherwise they are message sequence IDs. (type: bool)
ReturnsUndocumented (type: Any iterable of two-tuples of message sequence numbers and implementors of IMessageIMAP.)
def store(messages, flags, mode, uid): (source)

Set the flags of one or more messages.

ParametersmessagesThe identifiers of the messages to set the flags of. (type: A MessageSet object with the list of messages requested)
flagsThe flags to set, unset, or add. (type: sequence of str)
modeIf 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. (type: -1, 0, or 1)
uidIf true, the IDs specified in the query are UIDs; otherwise they are message sequence IDs. (type: bool)
ReturnsA 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. (type: dict or Deferred)
RaisesReadOnlyMailboxRaised if this mailbox is not open for read-write.
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.