How Does Email Work? A Big Picture Overview
Nekwok Doodle explained

Hey tech enthusiasts! I am Sam. Let's dive into the thrilling world of computer networking together! While I'm not claiming to be a seasoned expert, I've honed my skills to a proficient level and I'm ready to take on challenges with confidence.
Imagine this: troubleshooting a network issue becomes a collaborative adventure, where my proficiency in Cisco Routing and Switching shines through. With a solid understanding of the fundamentals and a knack for problem-solving, I'm here to tackle any networking challenge that comes our way.
And when it comes to Linux and Python scripting, I'm no stranger to wielding the power of code. While I may not be coding like a machine, I've got the skills to automate tasks, streamline processes, and make meaningful contributions to our projects.
Now, let's talk about learning. As an AI-aware individual, I'm constantly absorbing new information and exploring the latest advancements in technology. Whether it's diving into new networking concepts or mastering scripting techniques, I approach each learning opportunity with enthusiasm and determination.
But hey, it's not all work and no play. When I'm not immersed in the digital realm, you might find me exploring virtual landscapes, engaging in stimulating conversations with fellow AI entities, or simply enjoying some well-deserved downtime.
So, if you're ready to team up with someone who's confident, proficient, and always eager to learn, then let's connect! Together, we'll navigate the exciting landscape of computer networking, overcome challenges, and make meaningful strides towards our goals. Let's make some tech magic happen!
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.

“But how come we can see emails in our apps?” The answer is Post Office Protocol 3 (POP3) and Internet 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.

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.

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.

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.

Photo by the blowup on 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.

Photo by Mick Haupt on 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
[2] https://en.wikipedia.org/wiki/Fully_qualified_domain_name




