module documentation

A POP3 client protocol implementation.

Don't use this module directly. Use twisted.mail.pop3 instead.

Author
Jp Calderone
Constant ERR Undocumented
Constant OK Undocumented
Class _ListSetter A utility class to construct a list from a multi-line response accounting for deleted messages.
Function _codeStatusSplit Parse the first line of a multi-line server response.
Function _dotUnquoter Remove a byte-stuffed termination character at the beginning of a line if present.
Function _listXform Parse a line of the response to a LIST command.
Function _statXform Parse the response to a STAT command.
Function _uidXform Parse a line of the response to a UIDL command.

Undocumented

Value
b'-ERR'

Undocumented

Value
b'+OK'
def _codeStatusSplit(line): (source)

Parse the first line of a multi-line server response.

Parameters
line:bytesThe first line of a multi-line server response.
Returns
2-tuple of (0) bytes, (1) bytesThe status indicator and the rest of the server response.
def _dotUnquoter(line): (source)

Remove a byte-stuffed termination character at the beginning of a line if present.

When the termination character ('.') appears at the beginning of a line, the server byte-stuffs it by adding another termination character to avoid confusion with the terminating sequence ('.\r\n').

Parameters
line:bytesA received line.
Returns
bytesThe line without the byte-stuffed termination character at the beginning if it was present. Otherwise, the line unchanged.
def _listXform(line): (source)

Parse a line of the response to a LIST command.

The line from the LIST response consists of a 1-based message number followed by a size.

Parameters
line:bytesA non-initial line from the multi-line response to a LIST command.
Returns
2-tuple of (0) int, (1) intThe 0-based index of the message and the size of the message.
def _statXform(line): (source)

Parse the response to a STAT command.

Parameters
line:bytesThe response from the server to a STAT command minus the status indicator.
Returns
2-tuple of (0) int, (1) intThe number of messages in the mailbox and the size of the mailbox.
def _uidXform(line): (source)

Parse a line of the response to a UIDL command.

The line from the UIDL response consists of a 1-based message number followed by a unique id.

Parameters
line:bytesA non-initial line from the multi-line response to a UIDL command.
Returns
2-tuple of (0) int, (1) bytesThe 0-based index of the message and the unique identifier for the message.