Changeset 61549
- Timestamp:
- 01/28/2026 09:15:37 PM (3 weeks ago)
- Location:
- branches/6.9
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
src/wp-includes/pluggable.php (modified) (1 diff)
-
tests/phpunit/tests/pluggable/wpMail.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.9
-
branches/6.9/src/wp-includes/pluggable.php
r61547 r61549 445 445 446 446 try { 447 $phpmailer->setFrom( $from_email, $from_name );447 $phpmailer->setFrom( $from_email, $from_name, false ); 448 448 } catch ( PHPMailer\PHPMailer\Exception $e ) { 449 449 $mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' ); -
branches/6.9/tests/phpunit/tests/pluggable/wpMail.php
r61547 r61549 412 412 413 413 /** 414 * Test that the Sender field in the SMTP envelope is set by Core. 415 * 416 * A missing Sender field can lead to messages failing DMARC SPF checks. 417 * 418 * @ticket 49687 419 */ 420 public function test_wp_mail_sender_set() { 421 wp_mail( '[email protected]', 'Testing the Sender field', 'The Sender field should have been set.' ); 422 423 $mailer = tests_retrieve_phpmailer_instance(); 424 425 $this->assertSame( '[email protected]', $mailer->Sender ); 414 * Test that the Sender field in the SMTP envelope is not set by Core. 415 * 416 * Correctly setting the Sender requires knowledge that is not available 417 * to Core. An incorrect value will often lead to messages being rejected 418 * by the receiving MTA, so it's the admin's responsibility to 419 * set it correctly. 420 * 421 * @ticket 37736 422 */ 423 public function test_wp_mail_sender_not_set() { 424 wp_mail( '[email protected]', 'Testing the Sender field', 'The Sender field should not have been set.' ); 425 426 $mailer = tests_retrieve_phpmailer_instance(); 427 428 $this->assertSame( '', $mailer->Sender ); 426 429 } 427 430
Note: See TracChangeset
for help on using the changeset viewer.