From 54fe38c7ccd09193a88735ae29f2aff4e63b5a32 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sat, 20 Aug 2016 02:17:38 +0000 Subject: [PATCH] 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. Props Clorith, iandunn, DrewAPicture. Fixes #37736. Built from https://develop.svn.wordpress.org/trunk@38286 git-svn-id: http://core.svn.wordpress.org/trunk@38227 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 511e6acac6..5c7747774b 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -349,7 +349,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() */ $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 if ( !is_array( $to ) ) diff --git a/wp-includes/version.php b/wp-includes/version.php index ebbc9cf81a..3ef1c2d903 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38285'; +$wp_version = '4.7-alpha-38286'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.