Skip to content
Snippets Groups Projects
Unverified Commit d6679d17 authored by Claire's avatar Claire Committed by GitHub
Browse files

Add mail headers to avoid auto-replies (#23597)

parent f94aa70b
No related branches found
No related tags found
No related merge requests found
......@@ -7,9 +7,17 @@ class ApplicationMailer < ActionMailer::Base
helper :instance
helper :formatting
after_action :set_autoreply_headers!
protected
def locale_for_account(account, &block)
I18n.with_locale(account.user_locale || I18n.default_locale, &block)
end
def set_autoreply_headers!
headers['Precedence'] = 'list'
headers['X-Auto-Response-Suppress'] = 'All'
headers['Auto-Submitted'] = 'auto-generated'
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment