What happens when you send an email?
Sending an email involves several steps. The email program first prepares the message, then checks, transmits and finally delivers it to the recipient’s inbox. All of this happens within a few seconds.
How does sending an email work?
Every email begins with a webmail service through your browser or with an email program (also known as an email client) installed on your computer. The technical term for an email program is Mail User Agent (MUA), sometimes also called a Message User Agent.
Once you’ve written your message and clicked ‘Send’, the process of sending the email begins. But before the message reaches its destination, it goes through several stages: formatting, verification and forwarding.
The standard protocol for sending messages is the Simple Mail Transfer Protocol (SMTP). Incoming email is retrieved using either IMAP or POP3.
An overview of how sending an email works
| Step | Components involved | Task |
|---|---|---|
|
MUA (Mail User Agent) | Compose message and divide it into a header and body |
|
MSA/MTA (Mail Submission/Transfer Agent) | Verify address, check size and spam, forward to mail server |
|
MTA/Internet Node/Recipient MTA | Split message into data packets and send via the internet |
|
Recipient’s MDA/MUA | Store in the mailbox and retrieve by the recipient |
Step 1: The email program prepares the message
When you click Send, your email program prepares the message for sending by dividing it into two parts – the header and body.
The email header contains information such as the sender, recipient(s), subject line and the date and time of sending.
Below the header is the body of the email. The body includes the main content of the email – your message text and any attached files such as images or documents. Together, these make up the complete email that will be sent.
Step 2: The mail server checks the message
Next, your Mail User Agent (MUA) connects to your email provider’s mail server. A mail server runs software designed to continuously manage the sending and receiving of messages. This software is known as a Mail Transfer Agent (MTA) (or Message Transfer Agent) and forms the basis of a mail server.
Some providers also use a Mail Submission Agent (MSA) in front of the MTA. The MSA communicates directly with your email program, checking whether the recipient address is valid and linked to a real domain. Invalid or incorrectly formatted addresses are rejected, while valid ones are forwarded to the MTA. In many systems, the MSA function is already integrated into the MTA software.
Before the message is sent, the MTA checks whether it meets the provider’s size limits. Most email services allow attachments between 4 MB and 20 MB. If the message or attachments exceed this limit, you’ll receive an error message and the email won’t be sent. The MTA also scans outgoing messages for spam and malware such as viruses or Trojans. If everything is in order, the message is queued for sending.
Step 3: The message reaches the recipient’s mail server
In the next step, the MTA determines where to deliver the message by looking up the recipient’s mail server in the Domain Name System – unless the MSA has already done this. Once the server is found, the MTA checks whether the local part of the address (the portion before the @ sign) exists. If not (owing to a typo or simply because it doesn’t exist), the MTA returns the message to the sender along with an error notification. If the address is valid, the MTA forwards the message to the recipient’s mail server.
During transmission, the message – like most data sent over the internet – is divided into smaller data packets. Each packet is sent as part of a TCP segment, typically about 1,500 bytes in size, which is known as the Maximum Transmission Unit (MTU). This approach improves efficiency, as smaller packets move through the internet more smoothly and can take different routes to the destination, depending on which ones are less congested.
These packets travel across the internet through a network of exchange points known as internet nodes. At these nodes, email providers exchange large volumes of data with each other, making them a key part of the internet’s global infrastructure. Individual packets of an email pass through these nodes on their way to the recipient’s mail server. Once all packets arrive, they are reassembled to restore the email to its complete form.
Step 4: The email is delivered to the recipient
When the message reaches the recipient’s mail server, the MTA runs another series of checks, this time for:
- Maximum message size (as set by the provider)
- Potential spam (based on sender reputation and suspicious keywords)
- Virus and malware
Many providers now also use AI-driven filters to detect suspicious or fraudulent messages more accurately.
If the email passes all checks, a Message Delivery Agent (MDA) stores it in the recipient’s inbox. When the recipient opens their email program, their MUA retrieves the message from the server.
The whole process, from sending to delivery, usually takes only a few seconds.