Navigating emails can be like driving a car â most of us know how to drive one, but not everyone understands whatâs under the hood.
If you have ever opened a new email message and wondered whatâs behind it, youâve come to the right place.
In this article, Iâm going to pop open the hood on POP3, one of the mail protocols responsible for retrieving the emails we receive every day. Iâll show you how it works and provide you with a step-by-step tutorial on how to test it out yourself by using some simple POP3 commands.
Donât worry â itâs not rocket science. Letâs get straight into it!
What is POP3?
POP3, or Post Office Protocol version 3, is an Internet standard protocol that retrieves email messages from a server over a TCP/IP connection. Itâs the third version of the Post Office Protocol 3, which is defined in RFC 1939.
Unlike Internet Message Access Protocol (IMAP), which stores your emails on the mail server, POP3 downloads them from the server to your device. Itâs important to note that both are âemail retrievalâ or âpull protocols,â meaning they only receive new messages instead of sending them like Simple Mail Transfer Protocol (SMTP).
Read our article on IMAP vs POP3 for more information.
You can also watch our video tutorial to see what makes POP3 different from the IMAP pull protocol.
How does POP3 work?
POP3 connection is a 4-step process:
- The email client connects to the mail server
- The email client downloads new emails to the local device from the mail server
- By default, the mail server deletes the stored messages
- Note: The protocol can be configured to temporarily save your emails on the server
- The transmission ends when the client disconnects from the server
One of the easiest ways to understand POP3 is to think of the protocol as the mail clerk. In this analogy, your email would be physical mail, and the email server the post office.
Now, when you (acting as the email client) go to receive mail from the post office, the clerk (POP3) will give you all the new mail and let you collect (download) it, so you can bring it home (your local computer).
As it isnât a common practice, the post office doesnât make any copies of your mail, so the clerk will no longer have access to it once youâve picked it up. However, you can ask the clerk to make a copy of your mail and keep it at the post office.
What POP3 is used for
Besides its basic functionality to download messages from the email server, POP3 can also be integrated with various APIs for advanced use cases, such as:
- Custom API integration â If your business needs it, you can develop custom APIs that integrate with POP3 for specialized functions, like triggering actions in internal systems based on email content.
- Analytics and data processing â Once you download your emails via POP3, you can integrate natural language processing (NLP) or text analysis APIs like Google Natural Language or IBM Watson Natural Language Understanding to analyze the content of those emails. This can be super useful for sentiment analysis, keyword extraction, etc.
- Security and compliance â You can use POP3 to download emails and then work with security APIs such as VirusTotal or Proofpoint for threat detection, checking for spam, and phishing attempts.
Pros and Cons of POP3
I had a discussion on the advantages and disadvantages of POP3 with our deliverability specialist, Yaroslav, and hereâs his breakdown of the protocolâs pros and cons.
Pros
- Simple-to-use â POP3 is a straightforward protocol that focuses on delivering simplicity to the user. Implementing and using it is super easy, which makes it an ideal protocol for applications that require basic email functionalities.
- Reduced server load â As POP3 downloads and deletes emails from the server by default, it keeps the server storage space manageable, which, in turn, reduces load.
- Offline access â Because new emails are stored on your device, you will be able to manage them without an internet connection. This can be super useful for software that operates offline.
- Bandwidth efficiency â POP3 minimizes the amount of data transferred between the email client and mail server as you donât have to be connected to the internet all the time to see your emails. This goes a long way for slow internet connections with limited bandwidth.
- Legacy system compatibility â If youâre working with legacy systems, POP3 is the perfect option for you as itâs compatible with most older systems and can be easily integrated with them. Besides POP3, you can also use legacy app modernization.
- Supported by numerous email clients â As itâs been around for quite a while, many popular mail clients support POP3, such as Gmail, Mozilla Thunderbird, Apple Mail, Microsoft Outlook, and others.
Cons
- Limited features â Simplicity, the protocolâs biggest advantage, might as well be its biggest disadvantage as it lacks features such as folder management, server-side searching, etc.
- Risk of data loss â If you donât configure your POP3 client to store messages on the server after downloading them, youâre essentially facing the risk of data loss as the local copies might be compromised due to hardware failure or malware attacks.
- No synchronization â POP3 doesnât synchronize emails across devices in real-time, which can be a major limitation if you access your emails on different devices. If you canât live with this, then you might want to check out the two-way IMAP protocol.
- No backup solution â The protocol doesnât offer a backup solution, and as it downloads your messages locally, you will have to either configure it to keep your email on the server or back it up another way.
- Limited scalability â Because of its limited set of features and server-side capabilities, POP3 isnât the most optimal protocol for you if youâre building an application that scales with user growth.
- Local storage space consumption â Although a benefit of POP3 is that it reduces server load, thereâs a downside to it because all of the emails go to your local machine. This can be a huge issue if youâre dealing with large volumes of email or emails with large attachments or if youâre downloading all of your mail on a single device.
POP3 ports
For connecting to remote servers, the POP3 protocol typically uses two port numbers. Namely:
- Port 110 â The non-encrypted, default port, typically used by older email clients, internal networks where external access isnât an issue, or even for troubleshooting purposes.
- Port 995 â The encrypted, more secure port which supports SSL/TLS connections. Itâs used as standard by most webmail providers and preferred by the majority of users due to the security it provides.
POP3 settings
The most secure way of testing POP3 for yourself is to use OpenSSL, which encrypts your sensitive data. On top of that, I found it easy and efficient.
Just follow these steps:
- Download and install the latest version of OpenSSL
- Enable POP in your email provider settings, as it might be disabled by default
- Open your command line interface
- Connect to a POP3 server with openssls_client -connect pop.yourmailserver.com:995 -crlfÂ
- Make sure to replace yourmailserver with your providerâs domain name (e.g., gmail.com or mail.outlook)
- If you use Windows OS, you should omit -crlf as it can lead to an error due to double conversion
- Send the USER and PASS commands with your credentials. For example:
- USER yourusername
- PASS yourpassword
- Note, that if you have two-factor authentication enabled, you should use your App password to log in (if youâre a Gmail user, make sure to remove spaces in the 16-digit password)
- List all messages with the LIST command
- Use the retr command followed by the message number to see every message header and the text. For instance:
- retr 1
- If youâre encountering SSL_renegotiate:wrong ssl version error, simply add -ign_eof at the end of the first command: openssl s_client -connect pop.yourmailserver.com:995 -crlf -ign_eof
Enter QUIT to finish the session
The process should look something like this:
Learn more about email protocols
See? Didnât I tell you itâs not rocket science? We hope weâve cleared some things up and helped you understand how POP3 works.
If youâre up for more reads, we recommend you go over our article comparing POP3, IMAP4, and SMTP and further expand your knowledge about protocols, which are just a part of email infrastructure.Â
Now, running a local mail server or integrating an email protocol within your app is one thing, but ensuring your emails are delivered is another. Thatâs why you should check out deliverability services, such as the Mailtrap email delivery platform, which combines API and SMTP service to make sure your emails get delivered where theyâre supposed to and when theyâre supposed to.
Good luck!
We appreciate you chose this article to find out what is POP3 protocol. If you want to discover more similar content, follow Mailtrap blog!
Only registered users can post comments. Please, login or signup.