Simple Mail Transport Protocol (SMTP)
A client may send the following to a SMTP server.
EHLO mail.steamr.com MAIL FROM:<firstname.lastname@example.org> RCPT TO:<email@example.com> DATA From: "Cool Dude" <firstname.lastname@example.org> To: "Mister Alex" <email@example.com> Cc: firstname.lastname@example.org Date: Mon, 23 Sept 2019 22:19:00 -0600 Subject: Hello Hello. This is a test message Bye! . QUIT
HELO vs. EHLO
The greeting used by SMTP is typically a
ELHO. HELO is defined in RFC 821, published back in 1982 when mail was actually simple and without additional protocols and mechanisms like TLS or odd authentication schemes. EHLO is defined in RFC 2821 which was published in 2001 with the expectation that the response contains multiple lines containing keywords and parameters.
With the new RFC 2821, clients are expected to use the newer ELHO command and servers are expected to support both.
Example output from both HELO and ELHO. (As per the RFC, keywords are case-insensitive).
helo vps.steamr.com 250 vps.steamr.com Hello vps.steamr.com [::1] ehlo vps.steamr.com 250-vps.steamr.com Hello vps.steamr.com [::1] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP