WP Needs to Set "Sender" and "Reply-To" or DKIM/DMARC will not work using wp-mail (via PHPMailer) — at Initial Version
|Reported by:||kellogg9||Owned by:|
I notice that for DKIM to function (while using DMARC) correctly for outgoing mail the PHPMailer object needs to make sure the Sender and Reply-To fields match the "From" field otherwise the "Return-Path" header uses the server it is sending from causing a mismatch. When this happens DKIM fails authentication on the receiver side because it is not added to outgoing mail.
I tried adding the reply-to and sender header manually to wp_mail() but it did not work. One had to do the following:
Right now i have to manually modify the /wp-includes/pluggable.php file in the wp_mail() function to include:
$phpmailer->Sender = $phpmailer->From;
This resolves the problem and DKIM works again.