Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`mail`.`maildir`.`MaildirMailbox``

class documentation

`class MaildirMailbox(pop3.Mailbox): (source)`

Constructor: `MaildirMailbox(path)`

View In Hierarchy

A maildir-backed mailbox.

Method | `__init__` | No summary
Method | `appendMessage` | Add a message to the mailbox.
Method | `deleteMessage` | Mark a message for deletion.
Method | `getMessage` | Retrieve a file-like object with the contents of a message.
Method | `getUidl` | Get a unique identifier for a message.
Method | `listMessages` | Retrieve the size of a message, or, if none is specified, the size of each message in the mailbox.
Method | `undeleteMessages` | Undelete all messages marked for deletion.
Instance Variable | `deleted` | Undocumented
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.
Instance Variable | `path` | See `__init__`.

Inherited from `Mailbox`:

Method | `sync` | Discard the contents of any message marked for deletion.

def __init__(self, path): (source)

Parameters
path:`bytes` | The directory name for a maildir mailbox.

def appendMessage(self, txt): (source)

Add a message to the mailbox.

Parameters
txt:`bytes` or file-like object | A message to add.
Returns
`Deferred` | A deferred which fires when the message has been added to the mailbox.

def deleteMessage(self, i): (source)
from `twisted.mail.interfaces.IMailboxPOP3`
overrides `twisted.mail.pop3.Mailbox.deleteMessage`

Mark a message for deletion.

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

Parameters
i:`int` | The 0-based index of a message.
Raises
`IndexError` | When the index does not correspond to a message in the mailbox.

def getMessage(self, i): (source)
from `twisted.mail.interfaces.IMailboxPOP3`
overrides `twisted.mail.pop3.Mailbox.getMessage`

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

Parameters
i:`int` | The 0-based index of a message.
Returns
file-like object | A file containing the message.
Raises
`IndexError` | When the index does not correspond to a message in the mailbox.

def getUidl(self, i): (source)
from `twisted.mail.interfaces.IMailboxPOP3`
overrides `twisted.mail.pop3.Mailbox.getUidl`

Get a unique identifier for a message.

Parameters
i:`int` | The 0-based index of a message.
Returns
`bytes` | A string of printable characters uniquely identifying the message for all time.
Raises
`IndexError` | When the index does not correspond to a message in the mailbox.

def listMessages(self, i=None): (source)
from `twisted.mail.interfaces.IMailboxPOP3`
overrides `twisted.mail.pop3.Mailbox.listMessages`

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

Parameters
i:`int` or `None` | The 0-based index of a message.
Returns
`int` or `list` of `int` | The 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.
Raises
`IndexError` | When the index does not correspond to a message in the mailbox.

def undeleteMessages(self): (source)
from `twisted.mail.interfaces.IMailboxPOP3`
overrides `twisted.mail.pop3.Mailbox.undeleteMessages`

Undelete all messages marked for deletion.

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

deleted: A mapping of the information about a file before it was deleted to the full path name of the deleted file in the .Trash/ subfolder. = (source)

Undocumented

list: `list` of `int` or 2-`tuple` of (0) file-like object, (1) `bytes` = (source)

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.

path = (source)

See `__init__`.