]> source.dussan.org Git - redmine.git/commitdiff
Replaces List-Id header with Precedence and Auto-Submitted headers (#2984, #2879).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 5 Apr 2009 12:33:45 +0000 (12:33 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 5 Apr 2009 12:33:45 +0000 (12:33 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2655 e93f8b46-1217-0410-a6f0-8f06a7374b81

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

index 560f2cb6fb1b210d6afed1e560d162b849700039..c011d9d2ae75276dad331eaa1ec1b4245458a5d5 100644 (file)
@@ -267,7 +267,8 @@ class Mailer < ActionMailer::Base
     headers 'X-Mailer' => 'Redmine',
             'X-Redmine-Host' => Setting.host_name,
             'X-Redmine-Site' => Setting.app_title,
-            'List-Id' => "<#{Setting.mail_from.to_s.gsub('@', '.')}>"
+            'Precedence' => 'bulk',
+            'Auto-Submitted' => 'auto-generated'
   end
 
   # Appends a Redmine header field (name is prepended with 'X-Redmine-')
index e3eb65ae4ab36f9cdfa09b70cc48ce5b90f81302..d15af6e03a5aa641a480c0900b3538f9c23a02ca 100644 (file)
@@ -87,6 +87,16 @@ class MailerTest < Test::Unit::TestCase
     # restore it
     Redmine::Utils.relative_url_root = relative_url_root
   end
+  
+  def test_email_headers
+    ActionMailer::Base.deliveries.clear
+    issue = Issue.find(1)
+    Mailer.deliver_issue_add(issue)
+    mail = ActionMailer::Base.deliveries.last
+    assert_not_nil mail
+    assert_equal 'bulk', mail.header_string('Precedence')
+    assert_equal 'auto-generated', mail.header_string('Auto-Submitted')
+  end
 
   def test_plain_text_mail
     Setting.plain_text_mail = 1