Changeset 61010 for trunk/tests/phpunit/tests/pluggable/wpMail.php
- Timestamp:
- 10/21/2025 08:04:22 AM (8 weeks ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/pluggable/wpMail.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/pluggable/wpMail.php
r60699 r61010 409 409 410 410 /** 411 * Test that the Sender field in the SMTP envelope is not set by Core. 412 * 413 * Correctly setting the Sender requires knowledge that is not available 414 * to Core. An incorrect value will often lead to messages being rejected 415 * by the receiving MTA, so it's the admin's responsibility to 416 * set it correctly. 417 * 418 * @ticket 37736 419 */ 420 public function test_wp_mail_sender_not_set() { 421 wp_mail( 'user@example.org', 'Testing the Sender field', 'The Sender field should not have been set.' ); 422 423 $mailer = tests_retrieve_phpmailer_instance(); 424 425 $this->assertSame( '', $mailer->Sender ); 411 * Test that the Sender field in the SMTP envelope is set by Core. 412 * 413 * A missing Sender field can lead to messages failing DMARC SPF checks. 414 * 415 * @ticket 49687 416 */ 417 public function test_wp_mail_sender_set() { 418 wp_mail( 'user@example.org', 'Testing the Sender field', 'The Sender field should have been set.' ); 419 420 $mailer = tests_retrieve_phpmailer_instance(); 421 422 $this->assertSame( 'wordpress@example.org', $mailer->Sender ); 426 423 } 427 424
Note: See TracChangeset
for help on using the changeset viewer.