From 23a06ec0225442051a7c1043979a1a109d05142c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 13 May 2012 10:44:41 +0000 Subject: [PATCH] Restored List-Id header in email notifications (#10888). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9687 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/mailer.rb | 3 ++- test/unit/mailer_test.rb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index ef497986e..ca988cdd8 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -374,7 +374,8 @@ class Mailer < ActionMailer::Base 'X-Redmine-Site' => Setting.app_title, 'X-Auto-Response-Suppress' => 'OOF', 'Auto-Submitted' => 'auto-generated', - 'From' => Setting.mail_from + 'From' => Setting.mail_from, + 'List-Id' => "<#{Setting.mail_from.to_s.gsub('@', '.')}>" # Removes the author from the recipients and cc # if he doesn't want to receive notifications about what he does diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 483886e58..0bf62cfa7 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -163,6 +163,7 @@ class MailerTest < ActiveSupport::TestCase assert_not_nil mail assert_equal 'OOF', mail.header['X-Auto-Response-Suppress'].to_s assert_equal 'auto-generated', mail.header['Auto-Submitted'].to_s + assert_equal '', mail.header['List-Id'].to_s end def test_email_headers_should_include_sender -- 2.39.5