Make WordPress Core

Opened 3 months ago

#43878 new enhancement

Allow wp_mail to set Sender field when setting From

Reported by: bastho Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: trunk
Component: Mail Keywords: has-patch
Focuses: Cc:


[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 3 months ago.

Download all attachments as: .zip

Change History (1)

3 months ago

Note: See TracTickets for help on using tickets.