2017-08-25 90 views
0

我收到SMTPAuthenticationError at /rest-auth/password/reset/错误。all-auth SMTPAuthentication错误

我使用所有的auth-休息和设置这些对settings.py

EMAIL_USE_TLS = True 
EMAIL_HOST = 'smtp.gmail.com' 
EMAIL_HOST_USER = '[email protected]' 
EMAIL_PORT = 25 # or 587 
EMAIL_HOST_PASSWORD = 'mypassword' 

而且我启用Displaying an Unlock Captcha并允许less secure app access

缺少什么?

感谢

+0

你的'EMAIL_BACKEND'? –

回答

0

此配置是,如果你有smtp.gmail.com工作,其他SMTP类同与配置。

  1. 解锁Captha:https://accounts.google.com/DisplayUnlockCaptcha
  2. 更改为主动:https://www.google.com/settings/security/lesssecureapps

EMAIL_HOST = 'smtp.gmail.com' 
EMAIL_PORT = 587 
EMAIL_HOST_USER = '[email protected]' 
EMAIL_HOST_PASSWORD = 'your_password' 
EMAIL_USE_TLS = True 
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER 
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' 

我想你错过:EMAIL_BACKEND

+0

太棒了!你为什么不尝试回答这个问题呢? https://stackoverflow.com/questions/45842995/facebook-and-unregistered-user-all-auth –

+0

我从来没有使用该插件...也许返回的回调,但我不知道.. –

+0

行!不管怎么说,还是要谢谢你 –