diff options
Diffstat (limited to 'app/models/mailer.rb')
-rw-r--r-- | app/models/mailer.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb index dfd2737ab..9c409af69 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -272,6 +272,7 @@ class Mailer < ActionMailer::Base # Overrides default deliver! method to prevent from sending an email # with no recipient, cc or bcc def deliver!(mail = @mail) + set_language_if_valid @initial_language return false if (recipients.nil? || recipients.empty?) && (cc.nil? || cc.empty?) && (bcc.nil? || bcc.empty?) @@ -313,6 +314,7 @@ class Mailer < ActionMailer::Base private def initialize_defaults(method_name) super + @initial_language = current_language set_language_if_valid Setting.default_language from Setting.mail_from |