When you sent an email, your mail client submits it to an email server via ports 465 or 587 using SMTP. After initial communication, the email client establishes a two-way transmission channel to the mail server. All of them are using SMTP commands and replies to communicate. In the beginning interaction between the two is called a “handshake”.
One of these entities identifies the handshake sender, eg, hostname Next comes the original sender specification or the email address from which the message was sent. Later, the client and server exchange information for the destination address and the actual message content. When all this data is communicated, the Server Mail Transfer Protocol process closes the connection.
An email message can be sent directly to the final destination through the mail server in a single connection. Alternately, the email server may “relay” the message to other intermediate mail servers in a sequence of hops. When this same message is intended for multiple recipients, only one copy of SMTP sends all recipients to the same destination.
Additionally, an email client can connect to the SMTP server to authenticate the email sender. SMTP authentication is an extension of the protocol. Which allows only authenticated users to establish a connection. When the identity of the sender is confirmed. The email server will perform with the email transaction.
According to the Internet Engineering Task Force, if the transaction fails, the SMTP server must return a response error to the email client.



