twisted.mail.pop3client
module documentationtwisted.mail
View Source
A POP3 client protocol implementation.
Don't use this module directly. Use twisted.mail.pop3 instead.
Author | Jp Calderone |
Class | _ListSetter | A utility class to construct a list from a multi-line response accounting for deleted messages. |
Function | _statXform | Parse the response to a STAT command. |
Function | _listXform | Parse a line of the response to a LIST command. |
Function | _uidXform | Parse a line of the response to a UIDL command. |
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. |
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 | A non-initial line from the multi-line response to a LIST command. (type: bytes ) |
Returns | The 0-based index of the message and the size of the message. (type: 2-tuple
of (0) int ,
(1) int ) |
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 | A non-initial line from the multi-line response to a UIDL command. (type: bytes ) |
Returns | The 0-based index of the message and the unique identifier for the message. (type: 2-tuple
of (0) int ,
(1) bytes ) |
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 | A received line. (type: bytes ) |
Returns | The line without the byte-stuffed termination character at the beginning if
it was present. Otherwise, the line unchanged. (type: bytes ) |