Django, Gmail and Error 534

Google has gone paranoid lately. Gmail accounts now have a high level of security by default.

If you are using a Gmail account for sending email in Django and you get an error like this:

SMTPAuthenticationError: (534, '5.7.14 Please log in via your web browser and\n5.7.14 then try again.\n5.7.14 Learn more at\n5.7.14 rt12sm14054752pab.34 - gsmtp')

You probably scratched your head, checking the user and password and finding that they are right. Google now wants every machine to register for allowing it to send email.

If your Django instance is running in a server, one way to fix this problem consists in installing lynx and loading:

You will then ask to log into your Gmail account (the one configured in Django) and after that you will have to click on a button. All of this can be done in the console with lynx. Once you click on the "Unlock Captcha" button, the machine's IP will be registered into the Gmail account as authorised and you will be able again to send emails from Django.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply