fix-14792.diff

Go MAEDA, 2019-02-13 04:01

Download (1.22 KB)

View differences:

app/models/mailer.rb (working copy)
621 621
            'X-Auto-Response-Suppress' => 'All',
622 622
            'Auto-Submitted' => 'auto-generated',
623 623
            'From' => Setting.mail_from,
624
            'List-Id' => "<#{Setting.mail_from.to_s.tr('@', '.')}>"
624
            'List-Id' => "<#{Setting.mail_from_address.tr('@', '.')}>"
625 625

  
626 626
    # Replaces users with their email addresses
627 627
    [:to, :cc, :bcc].each do |key|
test/unit/mailer_test.rb (working copy)
213 213
    assert_equal issue.author.login, mail.header['X-Redmine-Sender'].to_s
214 214
  end
215 215

  
216
  def test_email_headers_list_id_should_not_include_display_name
217
    Setting.mail_from = 'Redmine <redmine@example.net>'
218
    issue = Issue.find(1)
219
    Mailer.deliver_issue_add(issue)
220
    mail = last_email
221
    assert_equal '<redmine.example.net>', mail.header['List-Id'].to_s
222
  end
223

  
216 224
  def test_plain_text_mail
217 225
    Setting.plain_text_mail = 1
218 226
    journal = Journal.find(2)