【发布时间】:2015-11-02 15:18:01
【问题描述】:
我的问题与this one 非常相似,但接受的答案并没有解决我的问题。
这是我的配置文件:
# Config for mailserver
config.active_support.deprecation = :notify
config.action_mailer.delivery_method = :smtp
# SMTP settings for Exchange server
config.action_mailer.smtp_settings = {
:address => 'outlook.<domain>',
:port => 25,
:authentication => :ntlm,
:user_name => '<userName>@<domain>',
:password => '<unencryptedPassword',
:domain => '<domain>',
:enable_starttls_auto => true
}
我已尝试在 Exchange 服务器上使用setting up a relay connector 来接受来自我的应用程序 IP 地址的请求。
另外,我最初的问题是在我使用 NTLM 之前,我的配置文件看起来像这样,但我得到了同样的错误:
# Config for mailserver
config.active_support.deprecation = :notify
config.action_mailer.delivery_method = :smtp
# SMTP settings for Exchange server
config.action_mailer.smtp_settings = {
:address => 'outlook.<domain>',
:port => 25,
:authentication => :login,
:user_name => '<userName>@<domain>',
:password => '<unencryptedPassword',
:domain => '<domain>',
:enable_starttls_auto => true
}
我已经成功地能够使用 Gmail 的 SMTP 服务器发送电子邮件,所以我认为这不是 Rails 端,而是 Exchange 服务器无法识别我的应用程序。
【问题讨论】:
标签: ruby-on-rails smtp exchange-server