How an e-mail travels: SMTP to the MX server, then IMAP or POP to the reader

E-mail·· 3 views· 4 min read

The short answer: an e-mail travels in three legs, and each leg uses a different protocol. First, your program hands the message to your server over SMTP, with a username and password. Next, your server looks up the MX record of the recipient domain in DNS and hands the message to the recipient server, again over SMTP, server to server. Finally, the recipient reads it on their own server over IMAP, POP or webmail. When an e-mail “does not arrive”, knowing which leg it stopped on is half the fix.

The three legs, one at a time

Leg What happens If it fails here, what you see
1. From your program to your server (submission SMTP) Outlook, your phone or your application connects to mail.yourdomain on port 465 (SSL/TLS) or 587 (STARTTLS), logs in with the full address and the mailbox password, and hands over the message. The server accepts it and puts it in its queue. An error the moment you send: password rejected, port blocked, message stuck in the Outbox. Nothing left your computer.
2. From your server to the recipient server (SMTP between servers) The server asks DNS for the MX of the destination domain and connects to that server on port 25. The destination server checks the sender (SPF, DKIM, DMARC, reputation) and accepts, rejects or asks to try again later. A bounce message with a 5xx code, or a delay notice while delivery is being retried. The e-mail left, but did not get in.
3. From the recipient server to the reader (IMAP, POP or webmail) The message is stored in the recipient mailbox, in the Inbox or in the spam folder, depending on the filters. Their program downloads it or shows it. The sender sees nothing wrong: on their side it was delivered. The recipient cannot find it because it is in spam, the mailbox is full or their program is not syncing.

Finding out which leg it stopped on

1 Was there an error when you sent? Then it is leg 1. Check the server, port and password in SMTP ports 465, 587 and 25, and whether the message is sitting in the Outbox.
2 Did you get a bounce? It is leg 2. Read the code and the sentence the destination server wrote: bounce message 550 explains the usual ones. A code starting with 4 is temporary (the server tries again); one starting with 5 is final.
3 No error and no bounce? Use Track Delivery in cPanel: it shows whether your server delivered the message and to which server.
4 Your server says it delivered? Then leg 2 went fine and the problem is on the recipient side (leg 3): ask them to check spam and whether their mailbox has room.
5 The other way round, mail from outside does not reach you? Check that your domain MX points to the server where your mailbox lives. If the MX points to another service, mail goes there and never reaches the cPanel mailbox: see DNS records explained and Email Routing in cPanel.
Changing the MX is not instant. Sending servers keep the DNS answer for the TTL of the record. Until that memory expires, some servers deliver to the old destination and others to the new one. Do not delete the old mailbox on the day of the change.
The header tells the whole journey. Every server the message passed through adds a “Received” line at the top of the header. Read from the bottom up, they show the route and the times: reading an e-mail header.

Cannot work out which leg your e-mail stopped on? Send us the destination address, the time you sent it and the bounce, if you got one.

Open a support ticket

SEE ALSO

Track Delivery: finding out what happened to a message you sent

Bounce message 550: user unknown, relay denied and rejected, what each one means

Reading an e-mail header: did SPF, DKIM and DMARC pass?

DNS records explained: A, CNAME, MX, TXT and TTL

SMTP ports 465, 587 and 25: SSL, STARTTLS and which one to use

Why your e-mail is not sending or receiving

RECOMMENDED PRODUCT

Professional e-mail on your domain

Mailboxes in your company name, no adverts, with spam filtering. from 5.940,00 Kz/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.