t.m.m.MaildirMailbox(pop3.Mailbox) : class documentation

Part of twisted.mail.maildir View Source View In Hierarchy

A maildir-backed mailbox.

Instance Variable path See __init__.
Instance Variable list Information about the messages in the mailbox. For undeleted messages, the file containing the message and the full path name of the file are stored. Deleted messages are indicated by 0. (type: list of int or 2-tuple of (0) file-like object, (1) bytes)
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 Retrieve a 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 all messages marked for deletion.
Method appendMessage Add a message to the mailbox.

Inherited from Mailbox:

Method sync Discard the contents of any message marked for deletion.
path =
See __init__.
list =
Information about the messages in the mailbox. For undeleted messages, the file containing the message and the full path name of the file are stored. Deleted messages are indicated by 0. (type: list of int or 2-tuple of (0) file-like object, (1) bytes)
def __init__(self, path): (source)
ParameterspathThe directory name for a maildir mailbox. (type: 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 for all messages 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)

Retrieve a file-like object with the contents of a message.

ParametersiThe 0-based index of a message. (type: int)
ReturnsA file containing the message. (type: file-like object)
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 string of printable characters uniquely identifying the message for all time. (type: bytes)
RaisesIndexErrorWhen the index does not correspond to a message in the mailbox.
def deleteMessage(self, i): (source)

Mark a message for deletion.

Move the message to the .Trash/ subfolder so it can be undeleted by an administrator.

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

Undelete all messages marked for deletion.

Move each message marked for deletion from the .Trash/ subfolder back to its original position.

def appendMessage(self, txt): (source)

Add a message to the mailbox.

ParameterstxtA message to add. (type: bytes or file-like object)
ReturnsA deferred which fires when the message has been added to the mailbox. (type: Deferred)
API Documentation for Twisted, generated by pydoctor at 2015-04-13 15:26:48.