501, b'Mail from address must be same as authorization user.', 'webmaster@localhost'
问题:重置密码时出错
SMTPSenderRefused at /users/password_reset/ (501, b'Mail from address must be same as authorization user.', 'webmaster@localhost')
解决方案:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.qq.com'
EMAIL_HOST_USER = 'xxxxxxx@qq.com'
EMAIL_HOST_PASSWORD = '***************'
EMAIL_PORT = 25
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER