summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-05-13 10:47:10 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-05-13 10:47:10 +0000
commit5a1be1d8df72faa39463ada50c4e10b8abc2ef03 (patch)
tree80646cbefce846a2e12928100249175892e8dd92
parent81c207b193e4b6a5e05e45301a2f90ac840747f0 (diff)
downloadredmine-5a1be1d8df72faa39463ada50c4e10b8abc2ef03.tar.gz
redmine-5a1be1d8df72faa39463ada50c4e10b8abc2ef03.zip
Backported r9687 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@9688 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/mailer.rb3
-rw-r--r--test/unit/mailer_test.rb1
2 files changed, 3 insertions, 1 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index 113a77337..d18394cdd 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -395,7 +395,8 @@ class Mailer < ActionMailer::Base
'X-Redmine-Host' => Setting.host_name,
'X-Redmine-Site' => Setting.app_title,
'X-Auto-Response-Suppress' => 'OOF',
- 'Auto-Submitted' => 'auto-generated'
+ 'Auto-Submitted' => 'auto-generated',
+ 'List-Id' => "<#{Setting.mail_from.to_s.gsub('@', '.')}>"
end
# Appends a Redmine header field (name is prepended with 'X-Redmine-')
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb
index 5607d1636..19e173c96 100644
--- a/test/unit/mailer_test.rb
+++ b/test/unit/mailer_test.rb
@@ -166,6 +166,7 @@ class MailerTest < ActiveSupport::TestCase
assert_not_nil mail
assert_equal 'OOF', mail.header_string('X-Auto-Response-Suppress')
assert_equal 'auto-generated', mail.header_string('Auto-Submitted')
+ assert_equal '<redmine.example.net>', mail.header_string('List-Id')
end
def test_email_headers_should_include_sender