【问题标题】:¨504 5.7.4 Unrecognized authentication type¨ Rails app to MS Exchange¨504 5.7.4 无法识别的身份验证类型¨ Rails 应用程序到 MS Exchange
【发布时间】: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


    【解决方案1】:

    原来我使用了错误的身份验证,因为 Exchange 服务器不需要任何类型的身份验证(主要是打印机、传真机等不需要进行身份验证)。

    这是我使用的结果设置:

    config.action_mailer.delivery_method = :smtp
    config.action_mailer.smtp_settings = {
      :address              => 'outlook.<domain>',
      :port                 => 25,
      :authentication       => :plain,
      :enable_starttls_auto => true
    }
    

    【讨论】:

    • 我实际上遇到了同样的问题。感谢您发布此消息!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-05
    • 1970-01-01
    • 1970-01-01
    • 2011-02-13
    • 1970-01-01
    • 2014-08-31
    相关资源
    最近更新 更多