From: Jean-Philippe Lang Date: Thu, 6 Sep 2012 17:30:01 +0000 (+0000) Subject: Merged r10147 from trunk. X-Git-Tag: 2.0.4~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9ab59b43b8f03a5cac232e0eebb5870af79594fd;p=redmine.git Merged r10147 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.0-stable@10302 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/mailer.rb b/app/models/mailer.rb index ca988cdd8..1f9a04af4 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -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