If you regularly use a computer, it’s pretty likely you send and receive countless emails each day—emails from clients, subscriptions, newsletters, messages from friends and family, and not to mention spammers. Most internet users don’t know these emails are sent or arrive in their inbox, and that’s okay. From the typical email user's standpoint, it seems simple. We think of email as something that pops up when messages come through to our mail client (Thunderbird, Yahoo, Outlook, etc.).
When you send an email to your Mom, you type her email address, compose, hit send, and her reply comes back to your email client. To some extent, this is true, but there’s much more to it than that. How emails are structured and transmitted is a complex process, and with the help of relatable analogies, we can explain the entire process in an easy to absorb manner.
For most email users, it’s not necessary to understand how email works to use it. If you’re interested in how these messages ping into your inbox, stick with us. This short introduction is to help you understand the basic principles of email. It’s surprising how similar the process of emailing is to the old-fashioned written format. If you’ve ever written a formal letter, you'll have no trouble getting your head around how email works.
Email was actually invented before the publicly accessible internet as we know it. Email was conceived as a means for computers to communicate with one another. From the early 1960s, the computer network ARPANET, a computer communications network created by the United States Department of Defense, developed a system of email transfers that relied upon the now-familiar "@" sign. Ray Tomlinson, the man widely acknowledged to have masterminded email as we know it chose the @ symbol deliberately.
According to Tomlinson, "The primary reason was that it made sense. The @ sign didn't appear in names, so there would be no ambiguity about where the separation between login name and hostname occurred. (Raytheon BBN Technologies, 11 February 2011).
The @ symbol allowed messages to target individual users on specific machines and not to localhost. The format of the email address was now username@host. This separation of usernames from machine names works similarly to how website IP addresses are allocated domain names. Once the domain name system (DNS) was developed, email addresses took the format email@example.com.
Emails are routed to user accounts via several computer servers. They route the message to their final destination and store them so that users can pick them up and send them once they connect to the email infrastructure. Email can be accessed through an email client or a web interface (more about these later). When you click send, the message is transmitted from your computer to the server associated with the recipient’s address. This process typically occurs via several other servers before the message gets to its intended recipient's mailbox.
Electronic mailboxes are central to how emails work for the end-user. A mailbox is where electronic mailboxes are stored, and when a user receives an email, the mail system automatically puts it in their mailbox. The mailbox makes emails user-friendly. They separate emails into folders, inbox, outbox, spam, etc., and allow users to scan mail, copy, delete, or forward it to another user. But what happens before it hits the mailbox?
Unlike your physical mailbox, where one service, the post office, handles all of your mail, your incoming and outgoing mail is handled differently with email. There are two types of servers. The Simple Mail Transfer Protocol (SMTP) an email delivery protocol used to send mail over the internet. SMTP contains information regarding the transmission details of an email message and is specifically used for outgoing mail. A Mail Transfer Agent (MTA) is a server program that uses SMTP to deliver emails.
There are two types of MTA, a client-based MTA, which involves installing software to access emails (such as Outlook), and a web-based MTA, accessed through a web browser (Gmail, for example). Anyone can use their computer to run an MTA.
It’s fairly easy, and an MTA will handle incoming mail well. Running your own MTA to deliver a high-volume of bulk-emails while maintaining a good level of deliverability will get complicated. There are standards and conventions that need to be followed. Failure to adhere to them will hurt your ability to deliver mail reliably. A shorter, more straightforward route would be configuring your clients to use your ISP’s SMTP server instead of setting up and running your own.
Sending mail is a different story. SMTP relies on the TCP port 25. When an email is sent, Port 25 is typically used to route the message to a local computer, designated with handling e-mail by a network operator. This email server is pre-approved by the email host, handles incoming email messages, and sends messages. The problem with Port 25 is that it gets clogged with spam emails if computers on the same network become infected with malicious software or a virus. For this reason, most anti-spam guidelines propose blocking port 25.
Unless users host their own email, they can’t send mail themselves since most internet service providers block Port 25, and SMTP servers require static IP addresses to do their job. Port 25 blocking allows ISPs to eliminate any spam that’s sent out through their networks. There is a snag, blocking this port tends to punish the innocent that need to send through email servers other than those belonging to their ISP.
The reason for blocking anyone and everyone from sending emails is to keep the internet in some working condition. Consider the massive amounts of spam that would be eating away at our collective bandwidth. Indeed, software that transfers electronic mail messages should be configured to filter it out, but if it weren’t, there would be no joy in opening that mailbox. The main thing to understand is that both an MTA and an SMTP server are needed to use email, as each is specialized for what it does.
The moment an email is sent, a message is routed from server to server via the Simple Mail Transfer Protocol until it makes its way from the client to the email recipient’s email server.
So there you have it, email transmission works in virtually the same way as sending real mail. Once an email is sent, the mail server puts it in an envelope (the SMTP protocol connection). Let’s take a look at how this works.
Mail Transfer Agents (MTAs) communicate with each other over the internet using SMTP protocol (SMTP servers). The recipient’s MTA then forwards the email to the incoming mail server (MDA, mail delivery agent), tasked with storing the mail until the user accepts it. To retrieve email on an MDA, a supporting protocol must be used. There are two main protocols, POP3 and IMAP. You might recognize these two acronyms since incoming mail servers are called POP servers, or IMAP servers, depending on which protocol they use.
POP stands for Post Office Protocol. This piece of software is used for retrieving email. POP3 gives an email user access to their emails stored in their user account on that server. You don’t need to stay online for the emails to come through. You just need to leave a copy of an email on the server to access it.
POP does have some drawbacks; namely, information transmitted through POP travels one way. This means that once an email is downloaded to a client, the client takes charge of sorting through the different status flags (e.g., sent, deleted, or answered). This was fine when the internet was young, before smartphones, tablets, and the like. People accessed their mail from a single location. Nowadays, it’s more likely that you access emails from many places; thunderbird at home, the mail app on your cell phone, or a web interface when you are at work, for example. With POP, you would have to sort through the information over each different device — assuming you’ve saved a copy of each email on the server.
IMAP (Internet Message Access Protocol) is a bit smarter about how it coordinates emails. IMAP clients have two-way communication with their servers. The IMAP protocol saves a copy of every message on the server so that, unlike with POP, multiple clients can access them. It’s completely synchronized. With IMAP, when you check an email on your tablet, it will be marked as read when you check your inbox on your phone. This happens because the status of the email is updated with all other clients during the server interaction.
IMAP is just like when your mail is categorized and stored at the post office for you and redelivers it when you are at home, at work, or pick it up in person. You can keep a properly marked archive on your home client as well as on your mail server. IMAP has an offline mode where any changes are synced with the server the next time you’re online. You may configure IMAP mail servers to fetch mail from POP inboxes, too, which works well if you’re seeking to consolidate. Of course, given that IMAP works with the "cloud" best, servers get involved, and storage can be problematic. Thankfully, storage space and bandwidth isn’t as pricey as it once was, but this will truly be a change-off for a few humans.
Let’s now take a look at how email is received. No surprises here — we’ll revert straight back to our mail carrier analogy. How would an envelope be delivered to the recipient on the front of the envelope? The postal service finds the most logical route to the recipient.
The electronic version of events is handled similarly:
Retrieving email is tasked by a software program called a Mail User Agent (MUA). There are two types of MUA, and these are classed depending on how emails are accessed, via installed software (email client) or through in browser (webmail).
Let’s break down how an email is transmitted. Like most Internet data, emails travel across the internet as a stream of packets using the internet’s TCP/IP protocol. This process can be broken down into three steps:
It might have been a while, but consider how you’d formulate a formal letter you’d take to your mail office or drop in a mailbox. You start by taking pen to paper and writing your name and address on the right-hand side. On the left-hand side, you write the name and address of the intended recipient. Once you’ve written the body of the letter, you place it in an envelope. This is sealed, and the intended recipient's address is written on the front so that the sorting office knows where the letter will be sent. Just in case there is a problem finding the recipient, the sender's address is written on the back.
As technical as email might sound, the letter analogy is the same as how emails are structured. Emails are composed in a mail client (comparable to pen and paper). This is known as MIME data (multipurpose internet mail extensions). The mail server puts the email into an envelope, including the recipient and sender’s addresses (this is called envelope data). Email users won’t come across the envelope since it’s part of an internal process to route an email.
An email is constructed with three parts:
The header includes the mandatory information, including the sender, recipient, and date. Other header lines such as subject and cc are optional. Although only required headers appear to the user, the header includes additional details such as the route the email took as it was transferred from one computer to another. We’ve mentioned the job of Mail Transfer Agents (MTAs). When an MTA forwards an email, it is time-stamped. You’ll notice that some emails that had multiple destinations since the email origination have several received headers. Most of this extra information is hidden inside the email. When viewed in their entirety, they look something like this:
There’s a lot to digest here, but we hope this piece has given you some understanding of just how much goes into the seemingly simple act of sending an email.
Want to do more with email? Our business email setup guide takes you through all the smart options to include from the very beginning when you get a business email address.
If you want to work through which email plan is best for you, or even try Namecheap’s Private Email for free for the first two months, you can view our Private Email page, or ask our friendly Customer Service Support to help you decide, anytime.