Email is older than the modern web, and it shows. We have three different protocols for what feels like one task.
In simple language: SMTP sends, IMAP and POP3 receive. Sender uses SMTP. The recipient’s mail client uses IMAP or POP3 to pull messages from their mailbox.
SMTP — Simple Mail Transfer Protocol
SMTP is the postman. It carries mail from our client to our outgoing mail server, and between mail servers across the internet.
- Port 25 — server-to-server SMTP. Often blocked by ISPs to fight spam.
- Port 587 — submission port for clients to send via their own server. Uses STARTTLS for encryption.
- Port 465 — implicit TLS. Originally deprecated, now back in use.
# What an SMTP conversation looks like (simplified)
> HELO client.example.com
< 250 Hello
> MAIL FROM:<manish@example.com>
< 250 OK
> RCPT TO:<friend@gmail.com>
< 250 OK
> DATA
< 354 Send message
> Subject: Hi
>
> Hello friend.
> .
< 250 Message accepted
> QUIT
SMTP is push-based. The sending server contacts the receiving server (looked up via the recipient’s MX record) and pushes the message.
IMAP — Internet Message Access Protocol
IMAP keeps mail on the server. Our client (Gmail web, Apple Mail, Outlook) just shows what’s there.
- Port 143 — plain.
- Port 993 — IMAP over TLS.
Why IMAP wins for most people:
- Same inbox on phone, laptop, web — read on one, marked as read everywhere.
- Folders, flags, drafts all live on the server.
- Server keeps the mail safe; client is just a viewer.
POP3 — Post Office Protocol v3
POP3 downloads mail to one device and (by default) deletes it from the server.
- Port 110 — plain.
- Port 995 — POP3 over TLS.
POP3 made sense when:
- Storage on the server was expensive.
- We had one PC and a slow dial-up line.
- We didn’t need to read mail on multiple devices.
Today it’s mostly a fallback option. Most people should use IMAP.
IMAP vs POP3 — Quick Pick
- Use IMAP if we read mail on more than one device.
- Use IMAP if we want server-side folders and search.
- Use POP3 only if we want to keep all mail locally on a single machine and the server has tiny storage.
How These Fit Together
┌──────────────┐
Manish writes │ SMTP 587 │
email ────────>│ (his mail │
│ server) │
└──────┬───────┘
│ SMTP 25
▼
┌──────────────┐
│ Recipient's │
│ mail server │
└──────┬───────┘
│
┌────────────┴────────────┐
▼ ▼
IMAP 993 (sync) POP3 995 (download)
│ │
▼ ▼
Friend's phone Friend's old laptop
Modern Reality
Most people don’t touch these protocols directly anymore — Gmail, Outlook web, and similar use HTTPS-based APIs internally. But IMAP and SMTP are still what desktop mail clients (Thunderbird, Apple Mail) speak under the hood.
Interview Tip
Keep it short: SMTP = send, IMAP = sync from server, POP3 = download and delete. Remember the secure ports (587, 993, 995) because interviewers love port numbers.