how does an e-mail work?

Email, as we all know, is a vital communication tool in today's world. But have you ever wondered how it actually works behind the scenes? Let's dive into it!

diagram

Application Layer Protocol


Email functions through various protocols to send and receive messages. The key protocol for sending emails is SMTP (Simple Mail Transfer Protocol), while POP3 (Post Office Protocol version 3) or IMAP (Internet Message Access Protocol) are used for receiving emails.

Transport Layer Protocol


TCP (Transmission Control Protocol) is the transport layer protocol that guarantees reliable email delivery by ensuring no data loss during transmission.

Sending an Email


When you send an email, your email client gets in touch with your email provider's SMTP server. This server acts as an intermediary, forwarding your email to the recipient's SMTP server. If both sender and recipient use the same email provider, the email is transferred directly, bypassing the intermediary server.

receiving an email


To receive emails, you can leverage POP3 or IMAP. POP3 retrieves emails from the POP server to your email client and can then erase them from the server. IMAP, on the other hand, stores your emails on the server and keeps them synced across all your devices, allowing you to view and manage them from any device.

So overall, email works by using a combination of protocols at the application layer (SMTP, POP3, and IMAP) and TCP at the transport layer to ensure reliable email communication and delivery across various devices and platforms.