Django email with smtp.gmail SMTPAuthenticationError 534 Application-specific password required

后端 未结 2 940
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 16:51

I am trying to have django send emails but I am getting this error:

Traceback (most recent call last):
  File \"\", line 1, in 
  Fi         


        
2条回答
  •  -上瘾入骨i
    2021-02-19 17:05

    Because you use 2 factor authentication, you must create a password for this application to access your Google account without the 2 factor auth.

    Perform all the steps on the Google support page to generate an application password, and then update your EMAIL_HOST_PASSWORD to use that, rather than your regular account password.

    On this page: support.google.com/accounts/answer/185833 follow the steps under the heading "How to generate an App password". After you generate it, you need to use that password in your configuration.

提交回复
热议问题