RFC5321
RFC 5321 is the standard that defines the Simple Mail Transfer Protocol (SMTP) for transferring email between mail servers. Published in 2008 as STD 53, it supersedes RFC 2821 and, together with RFC 5322 (the Internet Message Format), constitutes the core of Internet email transport. The document specifies the client–server dialogue that underpins SMTP, including the concept of an envelope sender and envelope recipients separate from the header fields used by end users.
A typical SMTP session begins with a TCP connection, the client sending EHLO (or HELO) to announce
SMTP supports extensions via EHLO, including 8BITMIME and SMTPUTF8, and, via other RFCs such as RFC 3207,
RFC 5321 is complemented by RFC 5322, which defines the syntax of Internet message headers and body,