从 Rails 进行 Exchange 身份验证时无法识别身份验证类型
尝试从 Ruby on Rails 向 Exchange Server 进行身份验证时出现此错误:
504 5.7.4 无法识别的身份验证 类型
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "x.x.x.x",
:port => 25,
:user_name => "xxdomain\xxuser",
:password => "xxxxxx",
:authentication => :login,
:enable_starttls_auto => true
}
我尝试了各种配置设置组合,包括更改设置以使用“普通”身份验证、添加域、将enable_starttls_auto 设置为 true、false,以及完全删除它、删除端口 没有任何效果。
有什么想法吗?
I'm getting this error when trying to authenticate with Exchange Server from Ruby on Rails:
504 5.7.4 Unrecognized authentication
type
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "x.x.x.x",
:port => 25,
:user_name => "xxdomain\xxuser",
:password => "xxxxxx",
:authentication => :login,
:enable_starttls_auto => true
}
I've tried all sorts of combinations of configuration settings, including changing the settings to use "plain" authentication, adding the domain, setting enable_starttls_auto to true, false, and removing it entirely, removing the port. Nothing has worked.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下内容来自链接:
Rails 和 Exchange电子邮件验证
1) 将ruby-ntlm gem 添加到您的 Gemfile 中并运行bundle install。
2) 将 NTLM SMTP 库添加到 config/environment.rb 文件中。
3) 设置环境文件以使用 NTLM 进行身份验证。
****用你自己的值替换***
The below is from link:
Rails and Exchange Email Auth
1) Add the ruby-ntlm gem to your Gemfile and run bundle install.
2) Add the NTLM SMTP library to your config/environment.rb file.
3) Set up your environment file to authenticate with NTLM.
****replace values with you own***