Changeset 61131
- Timestamp:
- 11/04/2025 05:18:55 PM (10 days ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
src/wp-includes/pluggable.php (modified) (1 diff)
-
tests/phpunit/includes/mock-mailer.php (modified) (1 diff)
-
tests/phpunit/tests/pluggable/wpMail.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r61038 r61131 384 384 $phpmailer->Body = ''; 385 385 $phpmailer->AltBody = ''; 386 387 /* 388 * Reset encoding to 8-bit, as it may have been automatically downgraded 389 * to 7-bit by PHPMailer (based on the body contents) in a previous call 390 * to wp_mail(). 391 * 392 * See https://core.trac.wordpress.org/ticket/33972 393 */ 394 $phpmailer->Encoding = PHPMailer\PHPMailer\PHPMailer::ENCODING_8BIT; 386 395 387 396 // Set "From" name and email. -
trunk/tests/phpunit/includes/mock-mailer.php
r59592 r61131 21 21 22 22 public function preSend() { 23 $this->Encoding = '8bit';24 23 return parent::preSend(); 25 24 } -
trunk/tests/phpunit/tests/pluggable/wpMail.php
r61025 r61131 652 652 } 653 653 } 654 655 /** 656 * Test that the encoding of the email does not bleed between long and short emails. 657 * 658 * @ticket 33972 659 */ 660 public function test_wp_mail_encoding_does_not_bleed() { 661 $content = str_repeat( 'A', 1000 ); 662 wp_mail( WP_TESTS_EMAIL, 'Looong line testing', $content ); 663 664 $mailer = tests_retrieve_phpmailer_instance(); 665 $this->assertEquals( 'quoted-printable', $mailer->Encoding ); 666 667 wp_mail( WP_TESTS_EMAIL, 'A follow up short email', 'Short email' ); 668 669 $mailer = tests_retrieve_phpmailer_instance(); 670 $this->assertEquals( '7bit', $mailer->Encoding ); 671 } 654 672 }
Note: See TracChangeset
for help on using the changeset viewer.