# How Does Email Work? A Big Picture Overview

# Introduction

Hello Doodlers! We are now in another doodle, and this time it will be something new. Come on and let us dig in to the world of email security.

# How email works?

You already know what an email is. You want to create a social media or any account online. To be able to do it, websites require you one thing, your email address. You input it in the form, noticed that you received a verification message. Clicking it verifies that you own the email account, redirected again to the landing page, and Boom! “*Account has been created successfully!*”

But have you wondered how it really works behind? That’s what I’ll teach you today!

## Email overview

**Email** or **Electronic Mail** basically runs on *Simple Mail Transfer Protocol (SMTP)*, and it has 2 primary components: ***SMTP Server*** and ***SMTP Client***. I know what you’re thinking, “*Are we talking about a server and a client PC?*” To be honest, No. Instead, **both are servers**. “*How did that happen?*” Unlike HTTP/S in which a client PC requests files to HTTP server to be loaded to a browser, SMTP is about transferring of messages from one server (***Sender-SMTP***) to another server (***Receiver-SMTP***). Any SMTP server can be both ***Sender-SMTP*** or ***Receiver-SMTP***.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756479801146/8725fb05-f23e-4a98-ad45-e80d73b6abc3.png align="center")

“*But how come we can see emails in our apps?*” The answer is ***Post Office Protocol 3 (POP3)*** and I***nternet Message Access Protocol (IMAP)***. You’ve seen this before, but ignored and I won’t blame you. While *SMTP* is used by email servers to transfer messages, these two protocols are used by end devices—*Yes, you’re right, client apps in smartphones and desktops*—to pull or retrieve email messages from the *SMTP* server.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756481132856/7d13bcd8-9cbf-4ceb-b606-5f2bc57050be.png align="center")

Both protocols can be used by the email client/agent to retrieve or pull messaged from the email server. \[1\]The main difference between ***POP3*** and ***IMAP*** is that ***POP3*** downloads messages from the email server and then it deletes it after. ***IMAP*** downloads the messages and leaves it undeleted (normally) so when any device with that email account logged in, it still can retrieve or pull messages.

## Sending and Receiving of an email

Now, you might be wondering the process of sending and receiving an email. It all starts when you decide to open your email client application (Gmail, Outlook, Yahoo, Zoho, etc.). You compose an email then send it to the one or few friends. Going back before sending the email, you typed your friends’ email addresses in the **TO:** section and you saw your email address is already in the **FROM:** automatically.

Email addresses in those fields (**FROM:** *and* **TO:**) play an important role—*obviously*—in the process of sending and receiving an email. Although it’s obvious that every communication has a sender (**FROM:**) and receiver (**TO:**), email does it somehow different.

An email address has two parts: **Username** and **Domain Name** (***mikaela*@*nekwokdoodle.com***) which is separated by ‘@’ symbol.

**FROM:** field determines where to send the email initially, **of course, to the sender’s email server** (*note that previously we discussed that SMTP servers transfer those messages*). To do that, it uses the email address’ domain name (e.g. *penguine@nekwokdoodle.com). The email client application does a* ***DNS query***—Yes, DNS!—to DNS servers looking for the sender domain’s email server. Once it gets the reply, it’ll then send the email to the ***sender domain’s email server***—You’re right, those email servers we discussed earlier has their own names, and it is what you called their \[2\] ***Fully Qualified Domain Name*** *(FQDN). In DNS perspective, they are called* \[3\] ***Mail Exchange*** *(MX)* *record*.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756485700909/d177f631-14ea-48d2-aa4f-496515491e16.png align="center")

**Sender’s email server** receives the email. Now, that server will start the process to *transfer* the email received from one of its **domain user’s mailbox** (***mikaela*@*nekwokdoodle.com***) to the **email server** of the **receiving domain**. Doing the same process, **NEKWOKDOODLE.COM**’s email server (**MX.NEKWOKDOODLE.COM**) will perform a DNS query to the DNS server looking for the **receiving domain’s** email server name (**MX record**) based on the domains present in **TO:** field email addresses.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756488808795/60d4bad6-ac30-43f8-b6b0-b4c9d7b51ba2.png align="center")

We can see above that after a successful DNS query, the email is transferred from **NEKWOKDOODLE.COM**’s domain email server (***MX.NEKWOKDOODLE.COM***) to **ZUENIFIER.COM**’s domain email server (***MX.ZUENIFIER.COM***). The email client application in PC with the **larry@zuenifier.com** account logged in will retrieve the email from its domain email server via **POP3** or **IMAP**.

# Putting it simple

Think of email communication like how traditional mail is delivered in real-life. You write a letter, putting it in an envelop. Then you put it in a **postbox/pillar box**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756489702440/20a013aa-f467-4093-a0ff-c0bd53c70343.jpeg align="center")

Photo by [the blowup](https://unsplash.com/@theblowup?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash) [on Unsplas](https://unsplash.com/@theblowup?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash)[h](https://unsplash.com/photos/red-and-black-mail-box-hY6qoQ4B_jw?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash)

The **local postman** will gather those envelop and send those to **Post Office**. **Mails** will be **transferred** to the **remote Post Office**. The **local postman** of that **remote Post Office** will then deliver the email to the recipient **mailbox** near the house.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1756490023855/41e24ea3-f574-4d2d-a77c-52463b27f1c1.jpeg align="center")

Photo by [Mick Haupt](https://unsplash.com/@rocinante_11?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash) [on Unsplas](https://unsplash.com/@rocinante_11?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash)[h](https://unsplash.com/photos/blue-and-white-mail-box-on-green-grass-field-iozza2qsWOA?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash)

Crafting the mail, putting it in an envelope, until it reaches the recipient mailbox represents the **SMTP** process. When the person goes to the mailbox near the house, it represents **POP3** or **IMAP**.

# Conclusion

Email becomes part of our every day lives as we continue living in the digital age. Knowing how to using it is enough, but knowing how it works is beneficial for IT professionals. This article provided you an overview on what technology email utilizes, and how it sends and receives messages from email users.

We only covered the SMTP technology, and for further learnings, I would advise discovering how email communications are secured. The technology is the same but with twists to ensure messages are not compromised by untrusted people.

**Any questions or suggestions? Comment it and I would be very happy to discuss that!**

# Resources

\[1\] [https://mailtrap.io/blog/smtp/#How-does-SMTP-work:~:text=through%20this%20port.-,Comparing%20SMTP%2C%20IMAP%2C%20and%20POP3,protocols%20is%20available%20here%20as%20well%20as%20in%20our%20dedicated%20video.,-How%20to%20send](https://mailtrap.io/blog/smtp/#How-does-SMTP-work:~:text=through%20this%20port.-,Comparing%20SMTP%2C%20IMAP%2C%20and%20POP3,protocols%20is%20available%20here%20as%20well%20as%20in%20our%20dedicated%20video.,-How%20to%20send)

\[2\] [https://en.wikipedia.org/wiki/Fully\_qualified\_domain\_name](https://en.wikipedia.org/wiki/Fully_qualified_domain_name)

\[3\] [https://en.wikipedia.org/wiki/MX\_record](https://en.wikipedia.org/wiki/MX_record)

[https://mailtrap.io/blog/smtp/](https://mailtrap.io/blog/smtp/)
