django和AWS SES服务设置554错误

时间:2017-09-19 18:19:27

标签: python django amazon-web-services

我设置了我的设置:

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')

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:4)

您需要将DEFAULT_FROM_EMAIL设置为one of the addresses verified in SES

或者,您可以在调用send_mail()(及相关)时传递from_email