Gmail's SMTP is bad. You need to create an app token that also allows IMAP access to your inbox. There's no way to create a "send only" account.
I wanted to use SMTP for automated notifications from my home monitoring system, and it was _easier_ to build a freaking Telegram bot rather than just setting up SMTP.