In 21st century emails have become one of the popular and convenient way to communicate. Though there are social media platforms which are also used for communication, email is often considered as a formal, secure and easy way to communicate that is used by millions and millions of people around the world.
We all utilise the email services in our day-to-day life but have you ever wondered how the email mechanism works, how the message sent by the sender reaches the recipient with just an easy click? Though your common instinct would be that the messages are directly sent from sender to recipient but really is this the case? No. When an electronic message is transferred, three parties are involved. There is a sender, a recipient, and a mail server involved in email mechanism. It is the mail server that sends the message to the recipient after it is received by the sender.
What is the purpose of email protocol in this context? By establishing connections between parties, it facilitates the transfer of data. So, for sending we need one protocol, and for receiving we need another. SMTP, POP3, and IMAP are three of the most commonly used email protocols. Let’s review which one is right for you.
What is SMTP?
Simple Mail Transfer Protocol is known by the abbreviation “SMTP”. Applications can use this protocol to send email messages over the Internet. The SMTP server is responsible for outgoing mail. SMTP is used to connect your email application to your mail server and send email messages. Mail transfer agents (MTAs) also use this protocol to deliver e-mail between servers – mail relaying. Sending emails is the only purpose of SMTP.
SMTP: The way it works
Sending commands to the SMTP server and receiving replies from the SMTP client constitute the SMTP workflow. Commands are nothing fancy but something like simple text message, mail from, mail to , etc. In addition to these commands, extended SMTP (also known as ESMTP) commands can also be used. Example of extend SMTP commands is TURN, ETRN, QUIT, VERB, etc. often numeric completion code are used to represent replies here. There are various numeric completion code like 254, 220, etc.
Three stages are involved in any SMTP conversation:
SMTP handshake – From the SMTP client, a TCP connection is established with the SMTP server. Upon receiving 250, the handshaking process begins. Upon receiving the recipient’s address confirmation, this stage ends.
Transfer of an email – The DATA command launches the transfer of an email via code 354. At the moment the server receives a final dot, the message has been sent.
In case of termination, both client and server use the commands QUIT and 221 and they are disconnected from each other from now on.
What is IMAP?
IMAP, or Internet Message Access Protocol, is one of the two most popular web-based email protocols (the other one is POP3). Because IMAP messages are stored on the email server, you can receive them on more than one computer. It will automatically be downloaded when the recipient opens it.This is an advantage of IMAP that POP3 doesn’t have. A client uses Internet Message Access Protocol (IMAP) to access emails on a server. Currently, it is in its fourth version, thus the term IMAP4 is also widely used. Therefore, IMAP allows access to the email regardless of the device or location.
IMAP: The way it works
In a nutshell, here is how an IMAP client interacts with a server:
- It is the recipient’s email client that connects to the server that stores the message
- Each message on the server has its header available to the recipient
- IMAP downloads messages on the fly when the recipient selects a particular message to read
What is POP3?
Post Office Protocol revision 3 is known as POP3. Email messages are received via this protocol by your mail server. It’s crucial to know that once you download your emails to your computer from your POP3 account, they are deleted from the server. This makes it impossible for you to read your email on more than one computer or in more than one place. This is a drawback of POP3 which is not present in IMAP. However, the low dependency on the Internet makes this protocol a favourite among users. With POP3, emails are downloaded from the server to the client, so they can be read off-line as well.
POP3: The way it works
There are four steps in setting up a POP3 connection:
- In authorization state, a connection is created between client and the server.
- In Transaction state, email is retrieved from the client.
- Messages are deleted from the server (UPDATE State)
- Connecting to the server is interrupted by the client
Using SMTP and IMAP, how do emails get from a sender to the recipient? The whole process in a nutshell.
As we know by now that SMTP is used for sending emails and IMAP for receiving email. Therefore, For sending and receiving messages, SMTP and IMAP must be used together. Essentially, these act as a link between the sender, the email server, and the recipient. SMTP is designed for pushing messages, while IMAP is designed for retrieving them. Here are the details of how SMTP and IMAP work together for delivering email.
Once you message is created and you press ‘Send’, your email client (e.g. Gmail, etc.) with the help of SMTP will send it to an email server. Now the sender’s email server will send the message to recipients’ email server using SMTP. When the recipient’s email client receives a successful SMTP transmission indicated by a 250 OK response code, the message will be downloaded using IMAP and placed in the recipient’s inbox.
The final word:
Now that we have required information about the email protocols, it’s the time to decide which one is better for you. In reality, it completely depends on what kind of protocol will be useful for you. It’s the matter of the demand of client that is for what purpose he/she is willing to use email protocols, which decides which among the above-mentioned protocols could be beneficial for you. So here we have listed the reasons when and why one should use the respective protocol.
you should go for IMAP4 in case
- Multiple devices are required to access your email
- As far as server storage capacity is concerned, you have no restrictions
- An Internet connection that is always stable is available to you
- Your mail needs to be categorized or organized in some way
- Accessing your email quickly is essential
you should go for POP3 in case
- You have poor or lastly no connection of internet
- Mail is only accessible to you and is located on a single device
- Due to the fact that no copies of the email are retained on the server after you receive it, you are concerned about your privacy