]> source.dussan.org Git - redmine.git/commitdiff
Restored List-Id header in email notifications (#10888).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 13 May 2012 10:44:41 +0000 (10:44 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 13 May 2012 10:44:41 +0000 (10:44 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9687 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/mailer.rb
test/unit/mailer_test.rb

index ef497986e39676885d1700bfed922d57af626500..ca988cdd88732dfa9c1649db7c71c566a9e35f2b 100644 (file)
@@ -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
index 483886e58b83c827958cdf4a41957e6039084288..0bf62cfa730a833bd9bdff64d36d6d6901465170 100644 (file)
@@ -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 '<redmine.example.net>', mail.header['List-Id'].to_s
   end
 
   def test_email_headers_should_include_sender