FYI, I'm following a tutorial on how to build a social media, the part where you set up an email server to send reset password messages to users. I understand that nowadays, Google has implemented policies that prevented applications from sending out emails unless they are deemed secure enough, so I try to work around this using an app password for custom app.
So far, I've already created an app password on my main google account. I've already set these following variables: MAIL_SERVER, MAIL_PORT, MAIL_USE_TLS, MAIL_USERNAME and MAIL_PASSWORD in my terminal, with MAIL_PASSWORD set to my app password. I then opened the flask shell several times and tested things out, but all I got is this error message SMTPServerDisconnected: please run connect() first
Here is the tutorial in question: https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-x-email-support