I recently had occasion to need to learn more about how SMTP works. It’s interesting sometimes how you can look, and look, and look without finding anything that explains what you need to understand at the right level, and then all of a sudden you find a ton of different resources that are perfect.
For anyone who is in the same boat, it appears that RFC5321 is the correct standard that deals with SMTP. Keep in mind that there is errata to the standard, and that it links out to dozens of other standards, so it’s not something that is particularly fast or easy to digest.
I really, really liked the description I found here of how SMTP works at a high level.