Adr*_*012 2 django sendgrid django-allauth
我目前正在尝试实施 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')
Run Code Online (Sandbox Code Playgroud)
我已经在 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'
Run Code Online (Sandbox Code Playgroud)
很感谢任何形式的帮助。
我自己遇到了这个问题 - 事实证明,除了上述设置之外,您还需要以下两个设置:
EMAIL_HOST = 'smtp.sendgrid.net'
# the email you verified with sendgrid (if you did single sender verification)
DEFAULT_FROM_EMAIL = 'myverifiedemailaddress@provider.com'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
395 次 |
| 最近记录: |