Unrecognized authentication type when doing an Auth to Exchange from Rails

前端 未结 1 950
既然无缘
既然无缘 2021-01-14 11:23

I\'m getting this error when trying to authenticate with Exchange Server from Ruby on Rails:

504 5.7.4 Unrecognized authentication type

相关标签:
1条回答
  • 2021-01-14 12:22

    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.

    # Load the rails application
      require File.expand_path('../application', __FILE__)
      require 'ntlm/smtp'
    # Initialize the rails application
      RailsApp::Application.initialize! 
    

    3) Set up your environment file to authenticate with NTLM.

    config.active_support.deprecation = :notify
    config.action_mailer.delivery_method = :smtp
    config.action_mailer.smtp_settings = {
     :address => '<your-email-server>',
     :domain => '<your-domain>',
     :user_name => '<your-username>',
     :password => '<your-unencrypted-password>',
     :port => 25,
     :authentication => :ntlm
    

    ****replace values with you own***

    0 讨论(0)
提交回复
热议问题