Django SendGrid + allauth

问题描述 投票:0回答:1

我目前正在尝试实现SendGrid,以便为注册的社交帐户用户发送确认电子邮件,并且出现以下错误

SMTPDataError at /accounts/facebook/login/callback/
(550, b'The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements')

我已经在SendGrid上完成了单一发件人验证,因此在这一点上应该没问题,但是我也联系了SendGrid以防万一。以下是我的设置,以防万一我错过了什么?

EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'apikey' # this is exactly the value 'apikey'
EMAIL_HOST_PASSWORD = config('SENDGRID_API_KEY')
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

非常感谢您的帮助。

django sendgrid django-allauth
1个回答
0
投票

我自己面对这个问题,遇到了这个问题-除了上面的设置,您还需要以下两个设置:

© www.soinside.com 2019 - 2024. All rights reserved.