我已经翻阅了我能找到的关于这个问题的每一个文件,但我无法弄清楚这一点。肯定有一些人使用Sendgrid作为Sendgrid作为文本博客的SMTP,但我不知道如何使用Sendgrid。
下面是我的app.yml设置:
env:
LANG: en_US.UTF-8
# DISCOURSE_DEFAULT_LOCALE: en
UNICORN_WORKERS: 3
DISCOURSE_DEVELOPER_EMAILS: 'admin@my_domain.com'
DISCOURSE_HOSTNAME: 'my_domain.com'
DISCOURSE_RELATIVE_URL_ROOT: /forum
## TODO: The mailserver this Discourse instance will use
DISCOURSE_SMTP_ADDRESS: smtp.sendgrid.net
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: apikey
DISCOURSE_SMTP_PASSWORD: API_KEY
DISCOURSE_SMTP_ENABLE_START_TLS: true显然,my_domain和API_KEY被替换为适当的值。我已经三次检查这些东西是否正确。我已经多次通过launcher rebuild app重建了这个应用程序。
语篇管理UI显示了以下设置:

然而,当我试图发送任何电子邮件时,我会收到一个弹出窗口,上面写着:
There was a problem sending the test email. Please double-check your mail settings, verify that your host is not blocking mail connections, and try again.服务器上的实际日志没有多大帮助:
Sent mail to test@my_email.com (91.2ms)
Completed 422 Unprocessable Entity in 287ms (Views: 0.2ms | ActiveRecord: 0.4ms)但是当我检查管理电子邮件UI的“跳过”选项卡时,我发现“跳过的原因”是[Sender] 550 Unauthenticated senders not allowed -所以我假设这是SendGrid的身份验证问题。我怎么解决这个问题?
发布于 2016-11-30 00:24:56
“未经身份验证的发件人不允许”是一个特定于SendGrid的错误,它显式地意味着您的系统没有发送AUTH命令。因此,即使您有身份验证普通集,也有一些东西正在覆盖它,并且在连接到SendGrid时不试图进行身份验证。
发布于 2017-03-20 13:29:18
您是否为该API密钥启用了“邮件发送”?

https://stackoverflow.com/questions/40781715
复制相似问题