| | 345 | |
| | 346 | /** |
| | 347 | * Test that the Sender field in the SMTP envelope is not set by Core |
| | 348 | * |
| | 349 | * Correctly setting the Sender requires knowledge that is not available to Core. An incorrect value will |
| | 350 | * often lead to messages being rejected by the receiving MTA, so it's the admin's responsibility to |
| | 351 | * set it correctly. |
| | 352 | * |
| | 353 | * @ticket 37736 |
| | 354 | */ |
| | 355 | public function test_wp_mail_sender_not_set() { |
| | 356 | wp_mail( 'user@example.org', 'Testing the Sender field', 'The Sender field should not have been set.' ); |
| | 357 | |
| | 358 | $mailer = tests_retrieve_phpmailer_instance(); |
| | 359 | |
| | 360 | $this->assertEquals( '', $mailer->Sender ); |
| | 361 | } |