Email Protocols
Most email today is sent via servers
that implement the Simple Mail Transport Protocol (SMTP) and received
via servers that implement the Post Office Protocol Version 3 (POP3).
These protocols are supported by the Python standard library modules
smtplib and poplib,
respectively. Some servers, instead of or in addition to POP3,
implement the richer and more advanced Internet Message Access
Protocol Version 4 (IMAP4), supported by the Python standard library
module imaplib, which I do not cover in this
book.
The poplib Module
The
poplib module supplies a class
POP3 to access a POP
mailbox.
The smtplib Module
The smtplib module
supplies a class SMTP to send mail to any SMTP
server.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access