2016-11-16 02:56:29 +11:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-03-20 05:20:07 +11:00
|
|
|
class ApplicationMailer < ActionMailer::Base
|
2016-11-17 04:25:21 +11:00
|
|
|
default from: ENV.fetch('SMTP_FROM_ADDRESS') { 'notifications@localhost' }
|
2016-03-20 05:20:07 +11:00
|
|
|
layout 'mailer'
|
2017-04-18 08:16:32 +10:00
|
|
|
helper :instance
|
2017-06-27 08:04:00 +10:00
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def locale_for_account(account)
|
|
|
|
I18n.with_locale(account.user_locale || I18n.default_locale) do
|
|
|
|
yield
|
|
|
|
end
|
|
|
|
end
|
2016-03-20 05:20:07 +11:00
|
|
|
end
|