File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
tests/phpunit/tests/pluggable Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -554,4 +554,22 @@ public function test_wp_mail_resets_properties() {
554
554
$ phpmailer = $ GLOBALS ['phpmailer ' ];
555
555
$ this ->assertNotSame ( 'user1 ' , $ phpmailer ->AltBody );
556
556
}
557
+
558
+ /**
559
+ * Test that the encoding of the email does not bleed between long and short emails.
560
+ *
561
+ * @ticket 33972
562
+ */
563
+ function test_wp_mail_encoding_does_not_bleed () {
564
+ $ content = str_repeat ( 'A ' , 1000 );
565
+ wp_mail ( WP_TESTS_EMAIL , 'Looong line testing ' , $ content );
566
+
567
+ $ mailer = tests_retrieve_phpmailer_instance ();
568
+ $ this ->assertEquals ( 'quoted-printable ' , $ mailer ->Encoding );
569
+
570
+ wp_mail ( WP_TESTS_EMAIL , 'A follow up short email ' , 'Short email – ' );
571
+
572
+ $ mailer = tests_retrieve_phpmailer_instance ();
573
+ $ this ->assertEquals ( '8bit ' , $ mailer ->Encoding );
574
+ }
557
575
}
You can’t perform that action at this time.
0 commit comments