我正在 DigitalOcean 上托管 Discourse 服务器,域名来自 PorkBun,邮件服务器来自 MailGun。
我的 MailGun 帐户已激活,并且域名 (discourse.mydomain.com) 已验证可与 mg.mydomain.com 一起使用。所有 DNS TXT 记录都已设置。
我已经多次完成了此处主题中的每一个故障排除步骤;Troubleshoot email on a new Discourse install
我可以在主机上输入 telnet 并手动发送电子邮件而没有问题 (https://serverfault.com/questions/49935/easiest-way-to-send-a-test-email-from-a-server-to-test-settings)。
app.yml 包含以下内容:
DISCOURSE_DEVELOPER_EMAILS: 'myemail@gmail.com'
DISCOURSE_SMTP_ADDRESS: smtp.mailgun.org
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: mail
DISCOURSE_SMTP_PASSWORD: "12345678901234567890"
DISCOURSE_SMTP_DOMAIN: mg.mydomain.com
DISCOURSE_NOTIFICATION_EMAIL: admin@mg.mydomain.com
当我尝试运行 discourse-doctor 或运行 ./launcher enter app 然后运行 rake 'emails:test[mail@mg.mydomain.com]' 时,我会收到以下错误:
======================================== ERROR ========================================
UNEXPECTED ERROR
Net::SMTPAuthenticationError
====================================== SOLUTION =======================================
This is not a common error. No recommended solution exists!
Please report the exact error message above to https://meta.discourse.org/
(And a solution, if you find one!)
=======================================================================================
Discourse 出了问题,因为我手动发送邮件没有问题。我已经搜索了 Google 和这里的论坛很多个小时,但还没有找到解决方案。有什么想法吗?