From fbf0d125d45c732dc14d14474d3f18da69f2267e Mon Sep 17 00:00:00 2001 From: aadlung Date: Wed, 2 Sep 2020 10:01:26 +0200 Subject: [PATCH] Set EnvelopeFrom (default) Removed the `false` of `$phpmailer->setFrom( $from_email, $from_name, false )` which is the `$auto` parameter of PhpMailer to also set the Sender address to the same value the From address has been specified --- src/wp-includes/pluggable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index b2ed4642c5977..f1d76ad91aff6 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -361,7 +361,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() $from_name = apply_filters( 'wp_mail_from_name', $from_name ); try { - $phpmailer->setFrom( $from_email, $from_name, false ); + $phpmailer->setFrom( $from_email, $from_name ); } catch ( PHPMailer\PHPMailer\Exception $e ) { $mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' ); $mail_error_data['phpmailer_exception_code'] = $e->getCode();