Permalink
Browse files

Merge pull request #752 from jetware/master

fixes broken mail configuration
  • Loading branch information...
2 parents 7b1b067 + 5887dc0 commit 34ed1a5b7bb08210a68eada2fa80dcf173819b49 @mvz mvz committed on GitHub Dec 23, 2016
Showing with 6 additions and 3 deletions.
  1. +3 −2 config/application.rb
  2. +3 −1 config/mail.yml.example
@@ -60,8 +60,9 @@ class Application < Rails::Application
begin
mail_settings = YAML.load(File.read("#{::Rails.root.to_s}/config/mail.yml"))
- ActionMailer::Base.delivery_method = mail_settings['method']
- ActionMailer::Base.server_settings = mail_settings['settings']
+ %w(delivery_method smtp_settings sendmail_settings file_settings).each do |key|
+ ActionMailer::Base.send "#{key}=", mail_settings[key]
+ end
rescue
# Fall back to using sendmail by default
ActionMailer::Base.delivery_method = :sendmail
@@ -1,8 +1,10 @@
-method: :smtp
+delivery_method: :smtp
settings:
:address: mail.example.com
:port: 25
:domain: example.com
# :authentication: :login
# :user_name: bob
# :password: bobsyouruncle
+sendmail_settings:
+ :location: /usr/bin/sendmail

0 comments on commit 34ed1a5

Please sign in to comment.