# POP3 and IMAP
## Email Retrieval Protocols
While SMTP is used to send email, users need separate protocols to retrieve email from their mail server. POP3 and IMAP are the two main protocols for accessing email stored on a mail server. They serve the same basic purpose but have important differences in how they manage email storage and synchronization.
## POP3 - Post Office Protocol Version 3
POP3, Post Office Protocol version 3, is a simple protocol for retrieving email from a server. POP3 operates on port 110 for unencrypted connections and port 995 for encrypted connections. When an email client connects to a POP3 server, it authenticates with a username and password, downloads all messages in the mailbox to the local device, and typically deletes the messages from the server after downloading them. The downloaded messages are then stored locally on the user's device.
POP3 is simple and works well when a user accesses email from only one device. All email is stored locally, so the user can read email even without an internet connection. The server requires minimal storage because messages are deleted after download.
The main limitation of POP3 is that it does not synchronize state between devices. If a user reads email on their phone, their laptop will still show the messages as unread when it downloads them. If messages are deleted from the server after downloading to the phone, the laptop cannot access those messages at all. This makes POP3 unsuitable for users who access email from multiple devices.
## IMAP - Internet Message Access Protocol
IMAP, the Internet Message Access Protocol, addresses the limitations of POP3 by keeping all messages on the server and synchronizing the state of the mailbox across all devices. IMAP operates on port 143 for unencrypted connections and port 993 for encrypted connections. When a user reads a message, marks it as read, moves it to a folder, or deletes it, these changes are reflected on the server and synchronized to all other devices that access the same account.
IMAP allows users to organize messages into folders on the server. Users can access their full message history from any device. Message flags such as read, replied, and flagged are synchronized across all devices. Users can search the server-side message store without downloading all messages. IMAP allows partial downloading of messages, retrieving only the headers initially and downloading the full message body only when the user opens a message.
## Choosing Between POP3 and IMAP
IMAP is the better choice for most modern users because it supports access from multiple devices with consistent state. POP3 may be preferred when local storage of email is important, when server-side storage is limited, or when offline access without any server dependency is required. Most email clients and services support both protocols, but IMAP is now the default recommendation.Back to Subject