Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/wp-includes/pluggable.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,9 @@ 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 );
// Passing $auto can be removed once PHPMailer supports setting the envelope sender separately. See <https://core.trac.wordpress.org/ticket/64368>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will the PHPMailer update make this line irrelevant, or will the update make it possible for people to work around the issue?

asking to clarify whether the default behavior with the PHPMailer update will be that the people experiencing their issue will find it resolved. also, with the update, will this line still be useful or benign? or will this workaround interfere with the PHPMailer update/will the PHPMailer update interfere with this workaround?

Copy link
Member Author

@SirLouen SirLouen Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmsnell yes, the PHPMailer update will make this a duplicate check. Leaving this will not do any harm, but I will make sure that I remove this lines once the library gets updated.

We could leave this on hold because there is a chance the PHPMailer update gets sooner than this. But if anyone wants to push it just to make sure it gets fixed, I will have an eye on it.

$auto = ! str_contains( ini_get( 'sendmail_path' ), ' -f' );
$phpmailer->setFrom( $from_email, $from_name, $auto );
} catch ( PHPMailer\PHPMailer\Exception $e ) {
$mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' );
$mail_error_data['phpmailer_exception_code'] = $e->getCode();
Expand Down
Loading