Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I avoid google mail server asking me to log in via browser?

I am trying to send emails from Django using an email configured by Google Apps, my configuration at the settings.py file looks something like this:

EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = '[email protected]' EMAIL_HOST_PASSWORD = 'password' EMAIL_PORT = 587 EMAIL_USE_TLS = True 

When I try to send an email using:

from django.core.mail import send_mail  send_mail("Happy new year", "We wish you the best for 3001",     "[email protected]", ["[email protected]"]) 

I get the following error:

SMTPAuthenticationError:  (535, '5.7.1 Please log in with your web browser and then try again.   Learn more at  5.7.1 https://support.google.com/mail/bin/answer.py?answer=78754 k2sm758604obl.14') 

Since I'm working on a remote server with no graphical user interface, I cannot even try to login from the browser.

like image 565
Juan Enrique Muñoz Zolotoochin Avatar asked Apr 04 '12 14:04

Juan Enrique Muñoz Zolotoochin


People also ask

Why does Google keep asking for my password?

Clear your cache and cookies. If you keep getting asked to change your password, someone may be trying to get into your account using harmful software. We strongly recommend that you: Update your anti-virus software and use it to scan your computer.

How do I stop my email password coming up automatically?

Look for your Google account under People at the top. Click Passwords. Scroll down and click the 3-dots ⋮ to remove each password you don't want stored in Chrome. You can disable the feature entirely using the slider at the top.


1 Answers

Just go to https://accounts.google.com/DisplayUnlockCaptcha and click "continue". This is going to allow access from other servers.

like image 158
Hasan Veli Soyalan Avatar answered Sep 28 '22 02:09

Hasan Veli Soyalan