Implements interfaces: twisted.mail.pop3.IMailbox

An in-memory mailbox.

Instance Variable msgs See __init__.
Method __init__
Method listMessages Retrieve the size of a message, or, if none is specified, the size of each message in the mailbox.
Method getMessage Return an in-memory file-like object with the contents of a message.
Method getUidl Get a unique identifier for a message.
Method deleteMessage Mark a message for deletion.
Method undeleteMessages Undelete any messages which have been marked for deletion.
Method sync Discard the contents of any messages marked for deletion.
Instance Variable _delete The indices of messages which have been marked for deletion. (type: set of int)
msgs =
See __init__.
_delete =
The indices of messages which have been marked for deletion. (type: set of int)
def __init__(self, msgs): (source)
ParametersmsgsThe contents of each message in the mailbox. (type: list of bytes)
def listMessages(self, i=None): (source)

Retrieve the size of a message, or, if none is specified, the size of each message in the mailbox.

ParametersiThe 0-based index of a message. (type: int or NoneType)
ReturnsThe number of octets in the specified message, or, if an index is not specified, a list of the number of octets in each message in the mailbox. Any value which corresponds to a deleted message is set to 0. (type: int or list of int)
RaisesIndexErrorWhen the index does not correspond to a message in the mailbox.
def getMessage(self, i): (source)

Return an in-memory file-like object with the contents of a message.

ParametersiThe 0-based index of a message. (type: int)
ReturnsAn in-memory file-like object containing the message. (type: StringIO)
RaisesIndexErrorWhen the index does not correspond to a message in the mailbox.
def getUidl(self, i): (source)

Get a unique identifier for a message.

ParametersiThe 0-based index of a message. (type: int)
ReturnsA hash of the contents of the message at the given index. (type: bytes)
RaisesIndexErrorWhen the index does not correspond to a message in the mailbox.
def deleteMessage(self, i): (source)

Mark a message for deletion.

ParametersiThe 0-based index of a message to delete. (type: int)
RaisesIndexErrorWhen the index does not correspond to a message in the mailbox.
def undeleteMessages(self): (source)

Undelete any messages which have been marked for deletion.

def sync(self): (source)

Discard the contents of any messages marked for deletion.

API Documentation for Twisted, generated by pydoctor at 2016-04-11 10:39:53.