首页 > 解决方案 > 无法向 django 中的其他用户电子邮件帐户发送电子邮件

问题描述

我以前使用 gmail smtp 发送邮件**(工作正常)** 但现在我在 sendgrid 中创建了新帐户,并且我在我的 django 项目中使用免费计划这是我关于发送网格的完整设置

EMAIL_HOST = 'smtp.sendgrid.net'
EMAIL_HOST_USER = 'apikey' # this is exactly the value 'apikey'
EMAIL_HOST_PASSWORD = 'SG.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' # this is API key
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

还需要其他设置吗??我正在使用 rest auth lib 测试电子邮件http://127.0.0.1:8000/rest-auth/password/reset/

是显示味精success": "Password reset e-mail has been sent."

收件人没有收到任何邮件,但在 sendgrid 仪表板中显示 9 或 10 等消息已发送

标签: djangosendgriddjango-email

解决方案


推荐阅读