How does Email work?
How does Email work?
Let’s first understand the E-mail architecture and key terminology. Email architecture involves several components and protocols that work together to enable the sending and receiving of emails.
Email Client
This is the application or software that users use to send and receive emails (e.g., Outlook, Gmail, Thunderbird).
E-mail Server
A server that stores and manages emails. It can be an outgoing (SMTP) server or an incoming (IMAP/POP3) server.
E-Mail Protocols
- SMTP (Simple Mail Transfer Protocol): Used for sending emails from the client to the server and between servers.
- IMAP (Internet Message Access Protocol): Allows users to access and manage their emails on the server without downloading them.
- POP3 (Post Office Protocol version 3): Downloads emails from the server to the client, typically deleting them from the server afterward.
User Agent(UA)
Each user who communicates with a program or process is called a User Agent(UA). UA is the electronic mail program associated with a specific operating system that allows users to type and edit messages.
Mail Box
There is one mailbox for a user which acts as an email storage system for that user.
Spool
The spool is a queue of messages. The messages in a spool are sent on a first come first served basis.
Mail Transfer Agent(MTA)
The mail transfer agent is the interface between the email system and the local e-mail server.
How Email Works
Composing the Email: The user creates an email in their email client, specifying the recipient’s email address, subject, and body.
Sending the Email:
The email client connects to the SMTP server using SMTP. The client transmits the email data (recipient address, sender address, subject, body).
Mail Server Processing:
The SMTP server processes the outgoing email and determines where to send it. It may relay it through multiple servers if the recipient’s server is different. If the recipient’s server is unreachable, the email may be queued for later delivery.
Receiving the Email:
The recipient’s mail server receives the email and stores it until the recipient accesses it. The server uses IMAP or POP3 to allow the recipient to retrieve their emails.
Accessing the Email:
The recipient opens their email client, which connects to the mail server using IMAP or POP3.
If using IMAP, the email remains on the server, allowing access from multiple devices. If using POP3, the email is downloaded and may be deleted from the server.
Reading the Email:
The email client displays the email to the recipient, who can then read it, reply, or forward it.