t.m.p.IMailbox(Interface) : interface documentation

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

Known implementations: twisted.mail.maildir.StringListMailbox, twisted.mail.pop3.Mailbox

Instance VariablesloginDelayThe number of seconds between allowed logins for the user associated with this mailbox. None (type: int )
messageExpirationThe number of days messages in this mailbox will remain on the server before being deleted. (type: int )
Method listMessages Retrieve the size of one or more messages.
Method getMessage Retrieve a file-like object for a particular message.
Method getUidl Get a unique identifier for a particular message.
Method deleteMessage Delete a particular message.
Method undeleteMessages Undelete any messages which have been marked for deletion since the most recent sync call.
Method sync Perform checkpointing.
def listMessages(index=None): (source)
Retrieve the size of one or more messages.
ParametersindexThe number of the message for which to retrieve the size (starting at 0), or None to retrieve the size of all messages. (type: int or None )
ReturnsThe number of octets in the specified message, or an iterable of integers representing the number of octets in all the messages. Any value which would have referred to a deleted message should be set to 0. (type: int or any iterable of int or a Deferred which fires with one of these. )
RaisesValueErrorif index is greater than the index of any message in the mailbox.
def getMessage(index): (source)
Retrieve a file-like object for a particular message.
ParametersindexThe number of the message to retrieve (type: int )
ReturnsA file containing the message data with lines delimited by \n. (type: A file-like object )
def getUidl(index): (source)
Get a unique identifier for a particular message.
ParametersindexThe number of the message for which to retrieve a UIDL (type: int )
ReturnsA string of printable characters uniquely identifying for all time the specified message. (type: str )
RaisesValueErrorif index is greater than the index of any message in the mailbox.
def deleteMessage(index): (source)

Delete a particular message.

This must not change the number of messages in this mailbox. Further requests for the size of deleted messages should return 0. Further requests for the message itself may raise an exception.
ParametersindexThe number of the message to delete. (type: int )
def undeleteMessages(): (source)

Undelete any messages which have been marked for deletion since the most recent sync call.

Any message which can be undeleted should be returned to its original position in the message sequence and retain its original UID.
def sync(): (source)

Perform checkpointing.

This method will be called to indicate the mailbox should attempt to clean up any remaining deleted messages.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:17:34.