class documentation
A maildir-backed mailbox.
| Method | __init__ |
No summary |
| Method | append |
Add a message to the mailbox. |
| Method | delete |
Mark a message for deletion. |
| Method | get |
Retrieve a file-like object with the contents of a message. |
| Method | get |
Get a unique identifier for a message. |
| Method | list |
Retrieve the size of a message, or, if none is specified, the size of each message in the mailbox. |
| Method | undelete |
Undelete all messages marked for deletion. |
| Instance Variable | deleted |
Undocumented |
| Instance Variable | list |
Information about the messages in the mailbox. For undeleted messages, the full path name of the message storing the file is 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. |
Add a message to the mailbox.
| Parameters | |
txt:bytes | IO[ | A message to add. |
| Returns | |
Deferred[ | A deferred which fires when the message has been added to the mailbox. |
overrides
twisted.mail.pop3.Mailbox.deleteMessageMark 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. |
overrides
twisted.mail.pop3.Mailbox.getMessageRetrieve 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. |
overrides
twisted.mail.pop3.Mailbox.getUidlGet 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. |
overrides
twisted.mail.pop3.Mailbox.listMessagesRetrieve 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. |
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 path to a deleted file before it was deleted to the full path name of the deleted file in the .Trash/ subfolder. =
(source)
¶
Undocumented