我设置了我的设置:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'email-smtp.us-west-2.amazonaws.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'I got something from Amazon SES SMTP Settings Create My SMTP Credentials'
EMAIL_HOST_PASSWORD = 'I got something from Amazon SES SMTP Settings Create My SMTP Credentials'
EMAIL_USE_TLS = True
但是,当我将此用于我的django-allauth电子邮件验证时,
来了
SMTPDataError at /accounts/email/
(554, b'Message rejected: Email address is not verified. The following identities failed the check in region US-WEST-2: webmaster@localhost')
我该如何解决这个问题?
答案 0 :(得分:4)
您需要将DEFAULT_FROM_EMAIL
设置为one of the addresses verified in SES。
或者,您可以在调用send_mail()
(及相关)时传递from_email
。