]> source.dussan.org Git - redmine.git/commitdiff
Fixed that Mailer.with_synched_deliveries does not use delivery settings (#11550).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 31 Jul 2012 18:09:33 +0000 (18:09 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 31 Jul 2012 18:09:33 +0000 (18:09 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10147 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/mailer.rb

index ca988cdd88732dfa9c1649db7c71c566a9e35f2b..1f9a04af410686d1241b9537dc745531f82053fa 100644 (file)
@@ -361,7 +361,9 @@ class Mailer < ActionMailer::Base
   def self.with_synched_deliveries(&block)
     saved_method = ActionMailer::Base.delivery_method
     if m = saved_method.to_s.match(%r{^async_(.+)$})
-      ActionMailer::Base.delivery_method = m[1].to_sym
+      synched_method = m[1]
+      ActionMailer::Base.delivery_method = synched_method.to_sym
+      ActionMailer::Base.send "#{synched_method}_settings=", ActionMailer::Base.send("async_#{synched_method}_settings")
     end
     yield
   ensure