summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-04-05 12:35:34 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-04-05 12:35:34 +0000
commit51a9f6a6ebc7d7a481903264f9cbaf56d5b33b2f (patch)
tree1b80afeebad4c630db87a063b80e296d1a6b5611
parent16810acf015a87f4cef407c7c79957ad9d48f1cd (diff)
downloadredmine-51a9f6a6ebc7d7a481903264f9cbaf56d5b33b2f.tar.gz
redmine-51a9f6a6ebc7d7a481903264f9cbaf56d5b33b2f.zip
Merged r2655 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2656 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/mailer.rb4
-rw-r--r--test/unit/mailer_test.rb10
2 files changed, 13 insertions, 1 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index 554261533..20b479a05 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -207,7 +207,9 @@ class Mailer < ActionMailer::Base
# Common headers
headers 'X-Mailer' => 'Redmine',
'X-Redmine-Host' => Setting.host_name,
- 'X-Redmine-Site' => Setting.app_title
+ 'X-Redmine-Site' => Setting.app_title,
+ 'Precedence' => 'bulk',
+ 'Auto-Submitted' => 'auto-generated'
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 1fd43af5d..5e728e9d3 100644
--- a/test/unit/mailer_test.rb
+++ b/test/unit/mailer_test.rb
@@ -86,6 +86,16 @@ class MailerTest < Test::Unit::TestCase
# restore it
ActionController::AbstractRequest.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