Site icon Mailtrap

The Ins and Outs of POP 3 (Post Office Protocol 3)

The Ins and Outs of POP3 (Post Office Protocol 3)

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:

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:

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

Cons

POP3 ports

For connecting to remote servers, the POP3 protocol typically uses two port numbers. Namely:

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:

  1. Download and install the latest version of OpenSSL
  2. Enable POP in your email provider settings, as it might be disabled by default
  3. Open your command line interface
  4. 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
  5. 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)
  6. List all messages with the LIST command
  7. 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!

Exit mobile version