You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
504 B

  1. # frozen_string_literal: true
  2. class ApplicationMailer < ActionMailer::Base
  3. layout 'mailer'
  4. helper :application
  5. helper :instance
  6. helper :formatting
  7. after_action :set_autoreply_headers!
  8. protected
  9. def locale_for_account(account, &block)
  10. I18n.with_locale(account.user_locale || I18n.default_locale, &block)
  11. end
  12. def set_autoreply_headers!
  13. headers['Precedence'] = 'list'
  14. headers['X-Auto-Response-Suppress'] = 'All'
  15. headers['Auto-Submitted'] = 'auto-generated'
  16. end
  17. end