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-')
# 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