I'm trying to automate sending Emails with STMP and after researching a bit, Access to your Google Account from less secure apps
"The Answer from Google Support") if I'm using Gmail it doesn't work anymore just with Email and Password.
so this code:
server.login(gmail_user, gmail_password)
does not work anymore. Does anybody know how to do it so it works again?
Or an alternative Email Company that doesn't have this "Feature"?
Thanks for help!
CodePudding user response:
You wont be able to use login and password but you can use Xoauth in order to access the smtp server.
If you have a google workspace account you could also use gmail api using a service account with domain wide delegation.
CodePudding user response:
You must create App password. Going to Google account. Security tab. After active 2 Step Verification, new option under "Signing in to Google" the "App passwords" option will be actived. Just create one app password and use as password to authenticate