首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Django SendGrid + allauth

Django SendGrid + allauth
EN

Stack Overflow用户
提问于 2020-05-17 22:09:51
回答 1查看 461关注 0票数 2

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

代码语言:javascript
复制
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以防万一。下面是我的设置,以防我可能遗漏了什么?

代码语言:javascript
复制
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'

任何帮助都是非常感谢的。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-06-16 04:37:18

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

代码语言:javascript
复制
EMAIL_HOST = 'smtp.sendgrid.net'
# the email you verified with sendgrid (if you did single sender verification)
DEFAULT_FROM_EMAIL = 'myverifiedemailaddress@provider.com'
票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61853146

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档