Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#43878 closed enhancement (duplicate)

Allow wp_mail to set Sender field when setting From

Reported by: bastho's profile bastho Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.1
Component: Mail Keywords: has-patch
Focuses: Cc:

Description

[38287] forces PHPMailer's setFrom() to don't set Sender field.

It seems to improve compatibility on some server environments, but it's a regression on those which support -f option. On these ones, the Sender is something like www-data@host which can cause SPF failure if the server name doesn't match the domain name (which occurs pretty often).

While this setting is very dependent of the server environment, I suggest to add a constant WP_MAIL_AUTO_SENDER to determine the expected behavior.

Attachments (1)

43878.patch (1.3 KB) - added by bastho 6 years ago.

Download all attachments as: .zip

Change History (3)

@bastho
6 years ago

This ticket was mentioned in Slack in #core by bastienho. View the logs.


6 years ago

#2 @SergeyBiryukov
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @bastho, thanks for the ticket and the patch!

We're already tracking this issue in #25239.

Note: See TracTickets for help on using tickets.