class documentation
class StringListMailbox: (source)
Constructor: StringListMailbox(msgs)
Implements interfaces: twisted.mail.interfaces.IMailboxPOP3
An in-memory mailbox.
Method | __init__ |
No summary |
Method | delete |
Mark a message for deletion. |
Method | get |
Return an in-memory 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 | sync |
Discard the contents of any messages marked for deletion. |
Method | undelete |
Undelete any messages which have been marked for deletion. |
Instance Variable | msgs |
See __init__ . |
Instance Variable | _delete |
The indices of messages which have been marked for deletion. |
Mark a message for deletion.
Parameters | |
i:int | The 0-based index of a message to delete. |
Raises | |
IndexError | When the index does not correspond to a message in the mailbox. |
Return an in-memory file-like object with the contents of a message.
Parameters | |
i:int | The 0-based index of a message. |
Returns | |
IO[ | An in-memory file-like object containing the message. |
Raises | |
IndexError | When the index does not correspond to a message in the mailbox. |
Get a unique identifier for a message.
Parameters | |
i:int | The 0-based index of a message. |
Returns | |
bytes | A hash of the contents of the message at the given index. |
Raises | |
IndexError | When the index does not correspond to a message in the mailbox. |
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 in each message 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. |