ENES

Email protocols

The shared rules, SMTP, IMAP and POP3, that carry an email from one inbox to another.

Your app sends mail with SMTP to your server, which asks DNS for the MX record and passes it with SMTP to their server; it waits in the mailbox until their app reads it with IMAP

Email works between any two providers because they all follow the same open rules. Sending and receiving are separate jobs with separate protocols. SMTP (Simple Mail Transfer Protocol) moves a message forward, from your app to your provider's mail server and from there to the recipient's. IMAP and POP3 are how the recipient's app later picks it up.

The trip goes like this. You hit send, and your app hands the message over SMTP to your provider. Your provider looks at the part after the @, say b.com, and asks DNS for that domain's MX record, which names the server that accepts mail for it. It connects to that server, again with SMTP, and delivers. The message now sits in the recipient's mailbox, on their provider's server, until they open their app. Usually this takes seconds; if the other server is down, yours keeps retrying for a while before bouncing it back to you.

Reading is where IMAP and POP3 differ. IMAP leaves the mail on the server and keeps every device in sync: read it on the phone and it shows as read on the laptop, delete it anywhere and it is gone everywhere. POP3 is older and simpler: it downloads messages to one device, often removing them from the server. Today IMAP, or a provider's own app, is the normal choice.

SMTP comes from the early 1980s and originally trusted whatever 'From' address a sender claimed, which is why spam and phishing are so easy to send. Extra checks added later, called SPF, DKIM and DMARC, let a receiving server verify that a message really comes from the domain it claims. Connections between servers are usually encrypted with TLS, but that is not end-to-end encryption: each provider can read the mail it stores.

Keep in mind

Go deeper

Related terms

More in Networks