I installed an Exchange-compatible mail server in a RoR application. I used the following setting in development.rb :
config.action_mailer.smtp_settings = { :address => 'mail.server.com', :port => 5870, :user_name => 'username', :password => 'password', :authentication => :login }
This setup does not work, I get Net::SMTPAuthenticationError: 504 Unrecognized authentication type.
However, if I apply the same configuration in environment.rb , it works fine:
ActionMailer::Base.smtp_settings = { :address => 'mail.server.com', :port => 5870, :user_name => 'username', :password => 'password', :authentication => :login }
Why is this? Shouldn't config.action_mailer.smtp_settings set the same settings? This is mistake? Does this have a reason?
I tried this with Gmail as it is here and it works , so smtp_settings has an effect on the mail program, but it seems to me that not all options are considered / work.
ruby-on-rails actionmailer
andrasf
source share