As you might guess, POP3 is the third incarnation of the Post Office Protocol. The idea being that mail is collected at the post office, mail transfer agents act as delivery men and women who drop the post in your box, and you collect it when you are ready. It is also a line-based protocol. This means that each line is sent separately, thus consuming a lot of processing cycles to retrieve the entire mailbox.
The poplib module offers a very easy, yet powerful interface for collecting email from your POP3 mailbox. The module has only two classes:
The poplib module offers a very easy, yet powerful interface for collecting email from your POP3 mailbox. The module has only two classes:
- class POP3(host[. port]): The plain text implementation of the POP3 protocol. If port is left off, the class defaults to the POP3 standard port 110.
- class POP3_SSL(host[, port[, keyfile[, certfile]]]): The SSL-encrypted implementation of the POP3 protocol. The default port is 995, but a different one can be specified. The keyfile specifies an optional PEM-formatted private key. The certfile is a certificate chain file for SSL.
SHARE