How Email Works
The short answer and the parts involved
How does email work? A message travels from the sender's mail program to the recipient's mailbox through a chain of mail servers, and each server in that chain has a defined role. When everything is working, the whole process usually takes only seconds.
Three kinds of software handle the job:
- Mail user agent (MUA). The program you write and read mail in, such as a desktop client, a phone app or a webmail page.
- Mail transfer agent (MTA). The server software that sends messages and passes them from one server to the next. Every sending and receiving server runs one.
- Mail delivery agent (MDA). The final step on the receiving server. It takes an arriving message and files it into the correct mailbox.
From the send button to the inbox
When you press send, your mail program connects to your provider's outgoing server and hands over the message. That server acts as the sending MTA. It looks up the recipient's domain in DNS, the system that tells the internet which server accepts mail for a domain, and then opens a connection to that server. The message is transferred using SMTP, the standard protocol for sending mail.
The receiving MTA checks the message before accepting it. It may confirm that the sending server is allowed to send for the domain, scan the content for spam and malware, and check that the recipient address exists. If the checks pass, the message goes to the MDA, which writes it into the recipient's mailbox.
If the receiving server cannot be reached, the sending server does not give up immediately. It keeps the message in a queue and retries for hours or days before returning a failure notice. This is why a short outage at the recipient's provider usually delays mail rather than losing it.
Reading mail is a separate step. The recipient's mail program connects to the mailbox and downloads or syncs messages using a protocol such as IMAP or POP3. Sending and receiving use different protocols, which is why an email account has separate outgoing and incoming settings.
An invoice from a freelancer to a client
A freelance designer sends an invoice to a client whose mail is hosted by a different provider. The designer's mail app submits the message to the outgoing server, which asks DNS where the client's domain receives mail. It then connects to the client's server, which checks the message and files it into the client's inbox. The client's phone shows a notification a few seconds later.
Frequently asked questions
Why does some email take a long time to arrive?
Usually a server along the route is temporarily unavailable, or the receiving server is deliberately delaying mail from unfamiliar senders. Sending servers keep retrying for several days, so most delays resolve without any action. If a message never arrives, the sender normally receives a bounce notice explaining the failure.
What is the difference between an MTA and an MDA?
An MTA moves messages between servers, choosing the next hop and retrying when delivery fails. An MDA runs at the final stage on the receiving server and places each message in the right mailbox. Many mail systems bundle both roles into one software package, so the distinction matters mainly when you troubleshoot.