A relatively recent change in Google's authentication system means you're going to have to "allow less secure app access" to your Google account, in order for this to work.

In your error, you are recommended to visit this link: https://support.google.com/mail/answer/78754

On that page:

Step #2 asks you to try Displaying an Unlock Captcha

Step #3 explains how to allow less secure app access. In summary:

Go to Allow less secure apps and choose "Allow" to let less secure apps access your Google account. We don't recommend this option because it may make it easier for someone to gain access to your account.


Recent security protocol of Google will not allow you to send messages through less secure apps.

So the fix is:

Turn ON less secure apps.

But only enabling this doesn't seem to work now. Google does not allow apps to send messages using your default gmail password. So to send messages you have to follow these two simple steps:

  1. Turn ON two factor authentication of your gmail account. Link to turn it on.

  2. Then create app password for your gmail account from Google. It will be a 16 digit code. Put it in settings.py or _credentials.py by: EMAIL_HOST_PASSWORD = 'sixt eend igit code' Link to know how to set up your application password for email

And BINGO! Problem will be solved.

Note: App password can only be created if you have enabled 2 factor authentication for your account.


For me, I did turn on the less secure app option even then I was getting SMTP error.This is how I solved it.

Go to https://accounts.google.com/DisplayUnlockCaptcha and allow access to your Google account by clicking on continue and then try resetting password again in Django.