How does email work?

here, there are two servers, both using SMTP. We have John and Jack, and in this scenario, John wants to send an email to Jack. Thus, they have an email client installed on their machine connected to the mail exchange server, which has a DNS server that maps the routing and maps the exchange server and inboxes.

So when John composes the message and clicks on send, he should be connected to a mail exchange server where the email is sent through that particular person’s inbox. So John’s inbox will then be validated, and that email will then be sent through the DNS server through the internet and will be received by the recipient mail server.

While John composes the mail, the from the field will have his email address, and the to the field will have Jack’s email address. When he clicks on send, it will go to their exchange server. The exchange server will then validate the inbox and identify where the inbox is located for Jack, and then through the internet, it will be sent to the mail server of Jack.

The mail server will then identify the right inbox that email needs to be sent to, and it stores the email in that particular inbox of the recipient. This way, when Jack accesses his inbox, the email from John will be waiting in his inbox. Jack can then reply the same way John sent the email.