【发布时间】:2023-04-05 10:22:02
【问题描述】:
我在 Godaddy 有一个 Office 365 邮件帐户。我正在尝试为我的 Rails 应用设置 SMTP 设置:
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.office365.com",
:port => 587,
:user_name => ENV["OFFICE_USERNAME"],
:password => ENV["OFFICE_PASSWORD"],
:authentication => 'login',
:domain => 'example.com',
:enable_starttls_auto => true }
但是当我通过从我的联系页面提交消息来测试这些设置时,我收到以下错误消息:
550 5.7.1 客户端无权作为此发件人发送
如何在 Rails 应用程序中为 Office 365 帐户设置 SMTP 设置?
【问题讨论】:
标签: ruby-on-rails email office365