SMTP stands for Simple Mail Transfer Protocol. It is the protocol used for the email service that is used on the internet. It works on the TCP/IP protocol. Using the SMTP, we can either send or receive email messages from anyone in the world using the world wide web.
SMTP is used by everyone indirectly when they send and receive any emails using any of the service providers. Even the private emails and the service based email use the same protocol. This protocol is maintained by IETF which stands for Internet Engineering Task Force, the protocol was even created by the same team.
For technical understanding, some people also call it RFC 821 and RFC 2821. However, it is widely popular by the name SMTP. After 2008, people also used to call it RFC 5321 and later on the name SMTP came.
All the famous email services such as Gmail, Yahoo, Microsoft, Outlook, etc uses SMTP.
The SMTP can be used in the TCP and is generally used under port number 25.
SMTP can be segregated into 4 main components. The four main components are –
- MUA – Stands for Mail User Agent
- MSA – Stands for the Mail Submission Agent
- MTA – Stands for the Mail Transfer Agent
- MDA – Stands for the Mail Delivery Agent
If you are wondering what are these names, then the
- MUA means the sender and the one who initiates the email.
- MSA and the MTA are the two services that will submit and transfer your email to the receiver.
- MDA is the receiver.
When the MUA sends a mail to anyone on the internet, It first falls into the MSA which further processes it. The MSA uses SMTP on port 587. Most of the mail service provider will allow mail to be sent from the port 25.
When the MSA gets the mail, it will then transfer the email to the MTA. Here, various things are checked such as DNS and the MX record. Once everything is confirmed, the mail is transferred and delivered to the receiver ie MDA. Various things are verified when the mail reaches MSA .Here all the necessary information is checked and the IMAP and the POP are used in order to send the email to the receiver.
Once everything is done, the receiver will receive the email. All of these things are done in the fraction of seconds. For this reason, whenever you send an email to anyone, the email gets delivered in minimal amount of time and the receiver can open it.
Please note that various spam checks and all the other services that you get in the email service are done after the email reaches the receiver. These things are not handled by the protocol.
Data in SMTP
You might be wondering about the commands or the data that are stored in the SMTP. Here, the three main types of command are stored, they are
MAIL: This is called the return path. Here, the return address is established
RCPT: It is command used to delivery the receipt of the email success or the failure to the sender. There are two receipts generated total for each of the recipients.
DATA: This is the actual data in the email. The one that you are sending and have created. There is also a header present in the DATA itself where all the information is stored. Whereas the body part is written differently.
Also refer NTP