Clients talk to Mail Transfer Agents (MTAs / Servers) in a client-server relationship, using IMAP or POP(3)
MTAs talk to each other in a peer-to-peer relationship, using SMTP (or more likely, ESMTP (extended))
SMTP
Defined in RFC 5321
This is the “envelope” that smtp servers use to send mail to each other.
IMF / Internet Message Format
Defined in RFC 5322
This is the format of the mail itself, which is transported over smtp.