【发布时间】:2020-11-10 13:01:25
【问题描述】:
我正在使用 Ruby 2.4.5 在我的公司服务器上部署 Redmine 4.1.1(一个 RoR 应用程序),但我无法使用 SMTP 功能。
我必须使用 ActionMailer from 选项来指示发件人电子邮件与用于身份验证的用户名不同。在我看来,我的 configuration.yml 文件中的“from”选项没有被使用,因为我收到了这个 550 错误:
550 5.7.1 Client does not have permissions to send as this sender
使用 Python smtplib,我已经能够发送电子邮件来验证凭据和配置是否正常工作,因此我可能在应用程序的配置中遗漏了一些东西。
下面是我的configuration.yml文件:
production:
email_delivery:
default_options:
from: 'email@company.com'
delivery_method: :smtp
smtp_settings:
address: ''
enable_starttls_auto: true
port: 1
authentication: :login
user_name: ''
password: ''
openssl_verify_mode: 'none'
【问题讨论】:
标签: ruby-on-rails actionmailer redmine