summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-02-16 09:33:32 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-02-16 09:33:32 +0000
commit93ae3063ad0455a0bd6b9994f718d20357a31e28 (patch)
tree75321fd1299c68dc1499f6a881b36071d204ff67 /lib
parent8b955e4eb6eb92138cbc6849dfc5dc8bece5c2ae (diff)
parenta89e9736266cbf9ccde3a49eccd8ab04f72bf38f (diff)
downloadgitlab-ce-93ae3063ad0455a0bd6b9994f718d20357a31e28.tar.gz
Merge branch 'add-auto-submited-header' into 'master'
Set `Auto-Submitted: auto-generated` header to emails Closes #20305 See merge request !9163
Diffstat (limited to 'lib')
-rw-r--r--lib/additional_email_headers_interceptor.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/additional_email_headers_interceptor.rb b/lib/additional_email_headers_interceptor.rb
new file mode 100644
index 00000000000..2358fa6bbfd
--- /dev/null
+++ b/lib/additional_email_headers_interceptor.rb
@@ -0,0 +1,8 @@
+class AdditionalEmailHeadersInterceptor
+ def self.delivering_email(message)
+ message.headers(
+ 'Auto-Submitted' => 'auto-generated',
+ 'X-Auto-Response-Suppress' => 'All'
+ )
+ end
+end