When you set up your e-mail account you will sooner or later be faced with the decision of choosing between IMAP or POP3. Both transfer protocols help you receive your e-mails. But what are the differences between IMAP and POP3? And when is it best to use which protocol?
For many people, sending and receiving e-mails is one of the most important internet services for both their private as well as business lives. What many don’t know, however, is what actually happens on the technical side of things when we write an e-mail and click the ‘send’ button. The protocol behind sending an e-mail is known as the Simple Mail Transfer Protocol (SMTP). The messages are either retrieved via IMAP or POP3. Additional programs, like mail user agents and mail transfer agents, are also used. This guide explains the various software agents available, which stages an e-mail goes through during the sending process, and what type of problems can arise during dispatch.
How does e-mail work?
As soon as the e-mail transmission process begins, a webmail service opens via a web browser or a locally-installed e-mail program (also known as e-mail client) on your computer. The technical name for an e-mail program is a mail user agent (also called message user agent or MUA).
After you’ve written a message in your MUA and clicked the ‘send’ button, the sending process then begins. Before the e-mail reaches its addressed destination, it must first pass through different stations where it is formatted, verified, and forwarded.
1. Converting an e-mail via an MUA
After you’ve sent the e-mail, your e-mail program first needs to convert the message. The MUA divides your message into two categories: header and body. The header section contains information about the sender as well as the date and time of dispatch. You can opt to add more information, such as the subject of the e-mail, or the name of the addressee. The content of the message is referred to as the body of the mail, which includes attachments (documents and images) as well as text.
2. Verifying an e-mail via an MTA
Your mail user agent gets in contact with your e-mail provider’s mail server. A mail server features a program that’s always online to receive and send e-mails: the mail transfer agent (MTA). The MTAcomprises the software foundation of a mail server.
In order to lighten the MTA’s load, a Message Submission Agent (MSA) can be installed. It’s in direct contact with the e-mail program and checks whether the address looks correct and belongs to a real domain. Incorrect e-mail addresses are rejected by the agent and valid e-mail addresses are forwarded to the MTA. An MSA is often already integrated into an MTA program.
Before your e-mail provider’s MTA sends the message, it’s first checked to make sure it doesn’t exceed the permitted size (depending on the e-mail provider it’s usually 4-20MB). If the e-mail or the file attachments are too big, you will be informed, and the mail dispatch will be stopped. The majority of e-mail providers check messages for spam or malware (e.g. viruses or Trojans) before sending them. If no spam is detected and the mail is the desired size, the MTA saves the sent message.
3. The sending process as far as the recipient–MTA
In the next step, your mail transfer agent searches for the recipient’s mail server in the domain name system (an online address directory) unless the MSA has already carried out this step. If the corresponding server can be accounted for, the local part of the address (everything before the ‘@’ sign) is checked to see if it exists. If the e-mail address cannot be found (because there is a typo or it does not exist), the MTA sends the mail back to the sender with information explaining the problem. If everything is accurate, then your MTA proceeds to forward the message to the recipient’s mail server.
In the process the message (just like other data traffic) is disassembled into several parts. Sending individual packets (the maximum size being 64KB) does have its advantages: on the one hand, smaller e-mails are easier to transmit. On the other hand it is possible for individual parts of an e-mail to use different data paths to reach the desired mail server. The packet always takes the transmission path where there is relatively little traffic.
The data traffic between the mail servers is based on the use of internet nodes. Endless amounts of data are exchanged using these nodes, making them an essential element of internet infrastructure. Here the e-mail providers exchange the messages amongst themselves. The individual mail packets reach the recipient’s mail server via these distribution nodes and are then re-assembled.
4. Second verification at the destination-MTA and delivering the mail
The e-mail has now arrived on the recipient’s mail server. Before the e-mail arrives with the actual addressee, the MTA checks the recipient of the inbound message. Once again, the size of the attachment is examined to see if it complies with the capacity of the recipient’s mail provider. If it is too big, it’s sent back to the sender. A check for spam content and malware once again takes place. If anything suspicious is found (e.g. certain terms like ‘Viagra’ in the text, known viruses or other computer-pests in the attachment, or if the sender is known for sending spam), the e-mail is then tagged or the transfer is stopped.
If your e-mail successfully passes these controls, the message is saved by the recipient’s mail server and can be retrieved by the addressee. The mail delivery agent (MDA) sends the message to the recipient’s e-mail inbox. As soon as the recipient accesses their inbox, the utilized MUA accesses the mail server’s MTA. The content is checked an additional time for spam and malware, but this time by the recipient’s e-mail program.
The e-mail is then in the inbox and can be opened and read. The many stages and security measures make sure that as few unwanted or harmful mails as possible find their way into your inbox. All these processes, which an e-mail has to go through before arriving with the recipient, take merely a few seconds.