Python poplib Module
Example
Show that the POP3 client class is available (non-networked):
import poplib
print(poplib.POP3.__name__)
Try it Yourself »
Definition and Usage
The poplib module implements a POP3 email client.
Use it to connect to a mail server, authenticate, list messages, download them, and delete them. Prefer modern libraries for production and always handle credentials securely.
Members
| Member | Description |
|---|---|
| POP3 | Plain-text POP3 client class. |
| POP3_SSL | POP3 client over SSL/TLS. |
| apop() | Authenticate using APOP if the server supports it. |
| dele() | Mark a message for deletion. |
| list() | List message numbers and sizes. |
| pass_() | Send the password to authenticate (used after user()). |
| retr() | Retrieve a full message by number. |
| stat() | Return mailbox status (message count and total size). |
| user() | Send the username to authenticate. |
| quit() | Commit changes and close the connection. |