ActionMailerとMS Exchange server

RailsのActionMailerをMS Exchange serverで使うには。

Gemfileに

gem "ruby-ntlm

config/environment.rbで

 require 'ntlm/smtp'

config/environments/production.rbでメールサーバの設定

   config.action_mailer.delivery_method = :smtp
   config.action_mailer.smtp_settings = {
     address:              'mailserver.com',
     port:                 25,
     domain:               'mail.com',
     user_name:            'username',
     password:             'password',
     authentication:       :ntlm,
     enable_starttls_auto: false
   }