Okay, fairy nuff.
In that case, I would probably start with writing an SMTP or IMAP proxy first. It will teach you everything you need to know about the protocols, and you can reverse engineer the protocols using a client that already works.
It would give you a tangible project outline, which I believe is often critical to not lose motivation or interest.
If you accept using libraries, there’s the imap crate, the mail_send crate, and samotoo crate that are worth looking at.
First sentence on the first hit when searching for “Gmail smtp imap”:
https://developers.google.com/gmail/imap/imap-smtp
What you’re referring to is the fact that GMail has apparently disabled authentication using username + password for SMTP/IMAP. I would assume that application passwords still work fine as a workaround, even if they don’t mention it specifically.