我收到SMTPAuthenticationError at /rest-auth/password/reset/
错误。
我使用all-auth-rest并在settings.py上设置这些
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'randomemail@gmail.com'
EMAIL_PORT = 25 # or 587
EMAIL_HOST_PASSWORD = 'mypassword'
此外,我启用了Displaying an Unlock Captcha
并允许less secure app access
缺少什么?
由于
答案 0 :(得分:1)
此配置如果您使用
smtp.gmail.com
,则其他smtp与此配置类似。
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'your_gmail@gmail.com'
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