Application layer protocol of electronic mail

The application layer protocol used for electronic mail (email) is Simple Mail Transfer Protocol (SMTP). SMTP is a protocol used for sending and receiving email messages between email servers and clients.

Here's a breakdown of the SMTP protocol:

SMTP Overview

SMTP is a TCP-based protocol that uses port 25 by default. It is used to send and receive email messages between email servers and clients. SMTP is a push protocol, meaning that the sender initiates the connection and sends the email message to the recipient's email server.

SMTP Commands

SMTP uses a set of commands to manage the email transmission process. Some common SMTP commands include:

SMTP Responses

SMTP also uses a set of responses to indicate the outcome of the commands. Some common SMTP responses include:

SMTP Flow

Here's an example of the SMTP flow:

  1. The client (e.g., an email client) initiates a connection to the server (e.g., an email server) using the HELO command.
  2. The server responds with a 250 response, indicating that the connection is accepted.
  3. The client sends the MAIL FROM command to specify the sender's email address.
  4. The server responds with a 250 response, indicating that the sender's email address is accepted.
  5. The client sends the RCPT TO command to specify the recipient's email address.
  6. The server responds with a 250 response, indicating that the recipient's email address is accepted.
  7. The client sends the DATA command to send the email message body.
  8. The server responds with a 250 response, indicating that the email message is received successfully.
  9. The client sends the QUIT command to terminate the connection.

SMTP Extensions

SMTP has several extensions that provide additional functionality, such as:

In summary, SMTP is the application layer protocol used for electronic mail, and it provides a set of commands and responses to manage the email transmission process.