Why does Google consider a request from my Django app to send an email via SMTP (smtp.gmail.com) to be insecure? Reading their security standards is not very helpful:
How more secure apps help protect your account When a third-party app meets our security standards, you can:
See what level of account access you’re giving the app before you connect your Google Account Let the app access only a relevant part of your Google Account, like your email or calendar Connect your Google Account to the app without exposing your password Disconnect your Google Account from the app at any time
This is a very common issue when emailing from Django. There are tutorials and stackoverflow question/answers (second answer) that 'solve' this by changing settings in your google account to allow less secure apps. I had this working and was OK with it until I read this from Control Access to Less Secure Sites:
Because Google is beginning to shut off Google Account access to less secure apps, the enforcement option is no longer available. We recommend turning off less secure apps access now. You should start using alternatives to less secure apps.
As Google gradually moves away from allowing less secure apps to access Google Accounts, you’ll receive email notifications about changes that affect you.
When I try searching 'How to make Django secure with Google' or 'Why does Django appear as an insecure app to Google' I see results that reflect more of the same guidance: just flip the switch to allow insecure apps on your Google account. I want to know why Django is considered insecure so that maybe I can configure it to be secure.
EDIT: I still haven't verified these steps make Django a 'more secure app'. Until then using an app password allowed me to keep 'Allow less secure apps' off. It was very simple to implement.