Mail: Don't set Sender field when setting From.
[38058] changed `wp_mail()` so that it used PHPMailer's `setFrom()` method rather than setting the From and FromName headers directly. See behavior of setting the `Sender` field. This causes `mail` to be called with the `-f` flag, which causes outgoing email to fail on some server environments. Merges [38286] to the 4.6 branch. Props Clorith, iandunn, DrewAPicture. Fixes #37736. Built from https://develop.svn.wordpress.org/branches/4.6@38287 git-svn-id: http://core.svn.wordpress.org/branches/4.6@38228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
96a453bca5
commit
873999207d
|
@ -349,7 +349,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
|
||||||
*/
|
*/
|
||||||
$from_name = apply_filters( 'wp_mail_from_name', $from_name );
|
$from_name = apply_filters( 'wp_mail_from_name', $from_name );
|
||||||
|
|
||||||
$phpmailer->setFrom( $from_email, $from_name );
|
$phpmailer->setFrom( $from_email, $from_name, false );
|
||||||
|
|
||||||
// Set destination addresses
|
// Set destination addresses
|
||||||
if ( !is_array( $to ) )
|
if ( !is_array( $to ) )
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.6.1-alpha-38271';
|
$wp_version = '4.6.1-alpha-38287';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue