Defect #14792
closed
- Related to Feature #13359: Add project identifier to List-Id header in notification emails for better Gmail filtering added
- Related to Defect #30785: Mail handler does not ignore emails sent from emission email address if Setting.mail_from includes display name added
You can fix this issue with the attached patch.
- Related to Feature #5913: Authors name in from address of email notifications added
- Assignee set to Go MAEDA
- Target version changed from 4.0.2 to 4.1.0
- Resolution set to Fixed
Fixed in r17870 along with #5913.
I will commit the following test later.
Index: test/unit/mailer_test.rb
===================================================================
--- test/unit/mailer_test.rb (リビジョン 17870)
+++ test/unit/mailer_test.rb (作業コピー)
@@ -213,6 +213,14 @@
assert_equal issue.author.login, mail.header['X-Redmine-Sender'].to_s
end
+ def test_email_headers_list_id_should_not_include_display_name
+ Setting.mail_from = 'Redmine <redmine@example.net>'
+ issue = Issue.find(1)
+ Mailer.deliver_issue_add(issue)
+ mail = last_email
+ assert_equal '<redmine.example.net>', mail.header['List-Id'].to_s
+ end
+
def test_plain_text_mail
Setting.plain_text_mail = 1
journal = Journal.find(2)
Adding a test method is too much. We can test that display name and other stuff is not included by adding only one line.
Index: test/unit/mailer_test.rb
===================================================================
--- test/unit/mailer_test.rb (リビジョン 17872)
+++ test/unit/mailer_test.rb (作業コピー)
@@ -198,11 +198,13 @@
end
def test_email_headers
+ Setting.mail_from = 'Redmine <redmine@example.net>'
issue = Issue.find(1)
Mailer.deliver_issue_add(issue)
mail = last_email
assert_equal 'All', 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
</diff>
- Subject changed from Don't add angle brackets in List-Id / mailer.rb to Don't add a display name and extra angle brackets in List-Id header field
- Status changed from New to Closed
Updated the test to catch this issue (r17873).
Also available in: Atom
PDF