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

后端 未结 15 1925
無奈伤痛
無奈伤痛 2020-12-04 18:13

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:

<         


        
15条回答
  •  -上瘾入骨i
    2020-12-04 18:40

    etusm provided two locations to turn on less secure apps:

    One here: https://myaccount.google.com/security?pli=1#connectedapps (bottom of the page)

    And one here: https://www.google.com/settings/security/lesssecureapps

    both were turned on, but my headless server still couldn't send me an email. based on JohnPang's google+ recommendation, i found a third location where i had to allow access to less secure apps:

    in myaccount.google.com, under 'Sign-in & Security', select 'Connected apps & sites'. this also has an option to 'Allow less secure apps'. after turning this one on, my server could now send me an automated email.

提交回复
热议问题