How do emails get into your inbox?

Kenny Wolf
Geek Talk
Published in
5 min readMar 26, 2024

Have you ever wondered how emails are sent get into your inbox?

In this article I will explain to you in a simple way the path of an email from clicking the “Send” button until it reaches your inbox.

The email flow that most people are probably familiar with looks something like this.

Simple Mail Flow: Sender — Internet — Recipient

After this article you will know and be able to explain the following flow:

Mail Flow: Sender — SMTP Server — DNS Server — Internet — Receiver SMTP — POP/IMAP Server — Receiver

We start with Bob

Imagine Bob. Bob has been a good friend of yours since childhood.

In a few weeks, Bob is celebrating his birthday and you are of course invited. To invite his closest friends, Bob sends an email with the invitation for his birthday party. Bob writes the invitation in his email client (Outlook, Gmail, Apple Mail, or something else).

An email client is a web or desktop based software with which you can send and receive emails.

He still needs to enter your email address. This is important for later. In this example, we use receiver@mail.com as the email.

Bob has finished his message and clicks on the send button with a big smile on his face.

Simple Mail Transfer Protocol

Your mail will now be sent to the SMTP server of your client.

A server is just a computer that is located somewhere in the world and whose purpose is to receive, process and send requests. SMTP stands for Simple Mail Transfer Protocol. This is simply a protocol (rules) for how mails should be transferred.

This means that Bob’s mail goes to the SMTP server (another computer that follows certain rules) of his email client.

Bob’s message is formatted correctly there according to the rules and prepared for further dispatch.

Domain Name System

After formatting Bob’s message, the SMTP server sends the recipient’s email address (yours) to the DNS server.

Now we have another computer, but it has a different purpose. Because it is a DNS server and that stands for Domain Name System. We humans are much better at remembering names such as medium.com. On the other hand, we are very bad at memorising complicated sequences of numbers such as 192.456.21.45.

But computers can do this quite well.

This strange sequence of numbers is known as an IP address (Internet Protocol address). I won’t go into detail here. For now, just think of this IP address as your digital home address.

The DNS server has a catalogue, similar to an address book, of which domain names belong to which IP address. For example, it finds your email receiver@mail.com and the corresponding IP address. The DNS server now sends this information to the SMTP server so that it knows where to send the message.

World Wide Web

Bob’s SMTP server has now formatted the message correctly and knows where to send it.

The SMTP server now sends Bob’s message to the big wide Internet. I assume you have a router at home or have at least seen one. Simply put, the Internet consists of many of these public routers. This means that the message is not sent directly but goes from router to router until it reaches the destination IP address.

It’s similar to sending a physical letter from Denmark to Australia. As a rule, it is not sent directly to Australia, but via intermediate stations.

Home Sweet Home

We have almost made it!

Bob’s message has found your SMTP server and is delivering the message. But before it lands in your inbox, the message is forwarded to a POP or IMAP server.

More computers?!

Yep, IMAP and POP are two methods to access email. This means that your mails are not stored directly on your computer, laptop or smartphone, but on this IMAP/POP server from which you have access.

Don’t get confused, POP and IMAP are simply protocols with certain rules.

You’re invited!

Once on the POP/IMAP server and you will receive a push message that you have a mail in your inbox.

Full of anticipation, you now open Bob’s mail with the birthday invitation.

Hola, you are cordially invited to my birthday party! There will be crisps, cola and entertainment! I’ve organised llamas.

Best regards, Bob.

Penguin riding a llama.
Source: Giphy

Note

As I wanted to explain this whole process in such a simple and understandable way, I have left some things out. For example, in some steps messages are still encrypted, or the sender is authenticated before the message is received.

Today I learned

Well today you have learnt a lot about the Mail Message Flow and Bob’s benefits.

Emails are indispensable today and I personally find it amazing how quickly and reliably this communication works.

Now you can brag about your new knowledge in the next bar round with friends.

If you liked this article then please leave a clap or two and follow for more content.

--

--

Kenny Wolf
Geek Talk

I write about tech, software development and hacking for non-techies and geeks 🤓 | Software Developer 👾 | Interested in pentesting 👹