##// END OF EJS Templates
Fixed: TMail 1.2.7 malforms To header when number of recipients more then 8 (#8751)....
Jean-Philippe Lang -
r7743:e39d7a0ca8d9
parent child
Show More
@@ -86,14 +86,21 end
86
86
87 ActionMailer::Base.send :include, AsynchronousMailer
87 ActionMailer::Base.send :include, AsynchronousMailer
88
88
89 # TMail::Unquoter.convert_to_with_fallback_on_iso_8859_1 introduced in TMail 1.2.7
90 # triggers a test failure in test_add_issue_with_japanese_keywords(MailHandlerTest)
91 module TMail
89 module TMail
90 # TMail::Unquoter.convert_to_with_fallback_on_iso_8859_1 introduced in TMail 1.2.7
91 # triggers a test failure in test_add_issue_with_japanese_keywords(MailHandlerTest)
92 class Unquoter
92 class Unquoter
93 class << self
93 class << self
94 alias_method :convert_to, :convert_to_without_fallback_on_iso_8859_1
94 alias_method :convert_to, :convert_to_without_fallback_on_iso_8859_1
95 end
95 end
96 end
96 end
97
98 # Patch for TMail 1.2.7. See http://www.redmine.org/issues/8751
99 class Encoder
100 def puts_meta(str)
101 add_text str
102 end
103 end
97 end
104 end
98
105
99 module ActionController
106 module ActionController
@@ -472,6 +472,14 class MailerTest < ActiveSupport::TestCase
472 # should restore perform_deliveries
472 # should restore perform_deliveries
473 assert ActionMailer::Base.perform_deliveries
473 assert ActionMailer::Base.perform_deliveries
474 end
474 end
475
476 def test_tmail_to_header_field_should_not_include_blank_lines
477 mail = TMail::Mail.new
478 mail.to = ["a.user@example.com", "v.user2@example.com", "e.smith@example.com", "info@example.com", "v.pupkin@example.com",
479 "b.user@example.com", "w.user2@example.com", "f.smith@example.com", "info2@example.com", "w.pupkin@example.com"]
480
481 assert !mail.encoded.strip.split("\r\n").detect(&:blank?), "#{mail.encoded} malformed"
482 end
475
483
476 context "layout" do
484 context "layout" do
477 should "include the emails_header" do
485 should "include the emails_header" do
General Comments 0
You need to be logged in to leave comments. Login now