Ruby/Rails ActionMailer not working with NTLM

后端 未结 3 1869
深忆病人
深忆病人 2021-01-22 02:06

I am setting up a mailer in my project and I am having difficulties sending mail through Exchange SMTP server.

I have installed the gem ruby-ntlm but I am s

3条回答
  •  被撕碎了的回忆
    2021-01-22 02:24

    This is because you haven't included the ntlm library.

    Add the NTLM SMTP library to your config/environment.rb file

    # Load the Rails application.
    require File.expand_path('../application', __FILE__)
    
    require 'ntlm/smtp' # ADD THIS LINE HERE
    
    # Initialize the Rails application.
    Rails.application.initialize!
    

提交回复
热议问题