From 1bd42bb9d2605ccf9267cafc59d816407a551430 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 3 Mar 2023 20:44:46 +0100 Subject: [PATCH] Add mail headers to avoid auto-replies (#23597) --- app/mailers/application_mailer.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 35f0b5fee1..69fd84be01 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -20,4 +20,10 @@ class ApplicationMailer < ActionMailer::Base headers['X-Auto-Response-Suppress'] = 'All' headers['Auto-Submitted'] = 'auto-generated' end + + def set_autoreply_headers! + headers['Precedence'] = 'list' + headers['X-Auto-Response-Suppress'] = 'All' + headers['Auto-Submitted'] = 'auto-generated' + end end