Changeset 38286
- Timestamp:
- 08/20/2016 02:16:54 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r38058 r38286 350 350 $from_name = apply_filters( 'wp_mail_from_name', $from_name ); 351 351 352 $phpmailer->setFrom( $from_email, $from_name );352 $phpmailer->setFrom( $from_email, $from_name, false ); 353 353 354 354 // Set destination addresses -
trunk/tests/phpunit/tests/mail.php
r38239 r38286 343 343 } 344 344 } 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 350 * to Core. An incorrect value will often lead to messages being rejected 351 * by the receiving MTA, so it's the admin's responsibility to 352 * set it correctly. 353 * 354 * @ticket 37736 355 */ 356 public function test_wp_mail_sender_not_set() { 357 wp_mail( 'user@example.org', 'Testing the Sender field', 'The Sender field should not have been set.' ); 358 359 $mailer = tests_retrieve_phpmailer_instance(); 360 361 $this->assertEquals( '', $mailer->Sender ); 362 } 345 363 }
Note: See TracChangeset
for help on using the changeset viewer.