What is SMTP
SMTP is the protocol mail systems use to relay mail between hosts. RFC 5321 defines it. A client opens a connection to port 25 on a mail exchanger, greets the server, and transfers the message with MAIL, RCPT, and DATA commands.
RFC 5321 also defines the envelope: the MAIL command carries the reverse-path, often called the envelope From, and the RCPT commands carry forward-path addresses. That envelope is not the same header block the user sees in a mailbox.
Relays and errors
RFC 5321 assigns three-digit reply codes. A 2xx code means the command succeeded for that stage. A 4xx code is a transient failure; the client may retry later. A 5xx code is a permanent failure for that recipient or transaction.
Many operators also publish enhanced status codes in the form x.y.z after the three-digit code. Google's SMTP error list is one vendor table that maps those codes to plain-language causes. This site quotes that list for Gmail rows.