Simple Mail Transfer Protocol (SMTP) is the backbone of email communication across the internet. It's the standard protocol that enables the transfer of emails between different servers and computer networks.
User composes email in MUA (Mail User Agent)
Think of SMTP as the postal service of the internet. When you send an email:
Just like postal workers follow specific procedures to sort, route, and deliver physical mail, SMTP servers follow standardized commands and responses to handle email delivery.
ESMTP (Extended SMTP)
Enhances the original SMTP with additional features and capabilities. It uses the EHLO command instead of HELO to initiate connections and supports additional parameters.
SMTPS (SMTP Secure)
Secures SMTP communication using TLS (Transport Layer Security) or SSL (Secure Sockets Layer) protocols to encrypt messages during transmission.
SMTP-AUTH
Adds authentication to SMTP, requiring mail clients to log in with username and password before sending emails. This helps prevent unauthorized use of mail servers.
SMTP operates through a series of commands and responses between servers, similar to a conversation:
Client: HELO example.com
Server: 250 Hello example.com, pleased to meet you
Client: MAIL FROM: <sender@example.com>
Server: 250 OK
Client: RCPT TO: <recipient@example.org>
Server: 250 OK
Client: DATA
Server: 354 Start mail input; end with <CRLF>.<CRLF>
Client: [Email content...]
Client: .
Server: 250 OK
Client: QUIT
Server: 221 Bye
This structured conversation ensures reliable email delivery across different systems and networks.