In this article, you will learn how to retrieve email messages from the mail servers programmatically. Particularly, you will come to know how to connect to the mail server using IMAP or POP3 protocols and read the emails in Python.