2016-11-24 20 views
1

我已查看过有关此问题的所有文档,并且无法弄清楚。有必须人们在那里使用Sendgrid作为SMTP的话语博客,但我无法弄清楚如何。sendgrid smtp的语音:[发件人] 550未经身份验证的发件人不允许

这是我的app.yml设置:

env: 
    LANG: en_US.UTF-8 
    # DISCOURSE_DEFAULT_LOCALE: en 
    UNICORN_WORKERS: 3 
    DISCOURSE_DEVELOPER_EMAILS: '[email protected]_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_domainAPI_KEY被替换为适当的值。我有三倍检查这些事情是正确的。我通过launcher rebuild app多次重建应用程序。

话语管理界面显示了这些设置:

enter image description here

然而,当我尝试发送的电子邮件,我得到的是说,一个弹出:

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 [email protected]_email.com (91.2ms) 
Completed 422 Unprocessable Entity in 287ms (Views: 0.2ms | ActiveRecord: 0.4ms) 

但是当我chec k管理电子邮件用户界面的“已跳过”选项卡,我看到“跳过原因”是[Sender] 550 Unauthenticated senders not allowed - 因此我认为这是SendGrid的身份验证问题。我该如何解决这个问题?

+1

一切看起来都不错。验证1)您的API密钥有权发送电子邮件,以及2)您正在复制实际的API密钥(创建时只显示一次)而不是API密钥ID。 – bwest

回答

0

“未经身份验证的发件人不允许”是SendGrid特定的错误,明确表示您的系统未发送AUTH命令。因此,即使您已设置身份验证明文集合,但重要的是,并且在连接到SendGrid时不尝试进行身份验证。

0

您是否为该API密钥启用了“Mail Send”?

enter image description here

相关问题