WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/20/2016 02:16:54 AM (4 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r38058 r38286  
    350350    $from_name = apply_filters( 'wp_mail_from_name', $from_name );
    351351
    352     $phpmailer->setFrom( $from_email, $from_name );
     352    $phpmailer->setFrom( $from_email, $from_name, false );
    353353
    354354    // Set destination addresses
Note: See TracChangeset for help on using the changeset viewer.