Day 22 — CS Fundamentals December — Mail Transfer — Introduction and the journey of an E-mail

All of us have used the email but have you ever wondered how a mail exactly gets transmitted so reliably over the internet?

It has a dedicated protocol called SMTP or Simple Mail Transfer Protocol which is meant to execute the mail transmission across the internet.

Initially, I thought of writing an article straight away explaining about SMTP.

But then, I realised that for understanding SMTP, it is important to know the flow of email and some technical jargon associated with it.

So, this article is going to be about that only.

Let’s dive in!


Mail transmission is a well-organized and reliable process due to the SMTP protocol.

In this article, I will be straight away demarcating the steps involved in the flow of the e-mail and on the way, I will explain any technical jargon which comes up.

So, I have written the steps in two parts:

  • Transmission part — Sending the mail from the user to the internet.
  • Receiving part — Receiving the mail for the receiver user from the internet.

This is because these parts follow different mechanisms to move mail between their own entities.

  • Transmission part involves push based mechanism.
  • Receiver part involves pull based mechanism.

Don’t worry, you will understand that reading the further article.

So, let’s get started with the steps involved in transmitting an email.

Steps involved in transmitting an email

Note: look at the diagram after step 4).

Step 1).

So, first of all, a user agent is an agent or software that provides mailing services to the user. For example, gmail, yahoo, hotmail, etc.

So, the user will access user agent, compose his mail and tell the user agent to send it forward.

Step 2).

Now, the user agent will send that mail to MTA Client.

Now, MTA or Message Transfer Agent is an agent/software which performs the responsibility of transferring mails across the network.

MTA has two sub-entities: MTA Client and MTA Server

So, in this step 2)., MTA Client would receive the mail from the user agent and send it to the MTA Server, which will be the entrypoint to the mail server.

Step 3).

So, MTA Server will receive the mail from MTA Client and a ton of other mails as well from other MTA Clients. So, it has a buffer storage called spool, where it will store/queue all the incoming mails.

Now, from this buffer/spool, a mail would be sent to an MTA Client (this is different from the previous) which is going to be part of the same mail server.

Step 4).

Finally, this MTA Client will be responsible for sending the mail through the internet to the mail server on the receiver side.

Steps involved in receiving the mail

Now, as mentioned previously, the mail will be sent through the internet to the receiver mail server. So, entrypoint to the receiver mail server is an MTA Server.

Note: look at the diagram after step 4).

Step 1).

So, that MTA Server will receive that mail from the internet. And that MTA Server will have the job to the incoming mails into right respective boxes corresponding to the users.

Step 2).

So, an MAA Server will be a part of the receiver mail server. And that MAA Server will pull mails from the respective boxes.

Now, this entity called MAA or Message Access Agent which will have the task to fetch and process incoming mail messages.

It also has two sub-entities: MAA Server and MAA Client.

Step 3).

Finally, an MAA Client (outside the receiver mail server) will pull the respective mail for its user from the MAA Server of the mail server.

Step 4).

Now, in the future, if the receiver user uses its user agent to check for mails, the user agent will talk the MAA Client (in step 3).) and see if there is any mail available for the user. If there is any mail, the user agent will parse that mail and show it to the user.

That’s it!

Thanks for reaching till here :D

I hope you understood and got a sweet introductory idea about SMTP and how mail transports from one user to another user through the internet.

If you liked the article, do give it some claps :D

Stay tuned for another article which is going to come tomorrow associated with some other interesting CS fundamental.



Email —




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yashvardhan Kukreja

Yashvardhan Kukreja


Site Reliability Engineer @ Red Hat | ex-Grofers | Contributing to {Cloud, Kubernetes}-native OSS