[wp-trac] [WordPress Trac] #22837: WP Needs to Set "Sender" and "Reply-To" or DKIM/DMARC will not work using wp-mail (via PHPMailer)
WordPress Trac
noreply at wordpress.org
Sat Apr 16 14:53:25 UTC 2016
#22837: WP Needs to Set "Sender" and "Reply-To" or DKIM/DMARC will not work using
wp-mail (via PHPMailer)
--------------------------+-----------------------------
Reporter: kellogg9 | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: Future Release
Component: Mail | Version: 3.4.2
Severity: major | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+-----------------------------
Comment (by kellogg9):
Hi @cbutlerjr ... thanks for the reply. A few years back, about a year
after i opened this bug ticket, i stumbled upon the phpmailer_init()
action and implemented a virtual identical version that you wrote (shown
below). It has been working ever since. Thanks for adding this to my
ticket. I guess i should have added an update here a few years back.
Here is hoping though that the core team finally adds the fix into their
official build.
~Kimberly
> {{{
> add_action( 'phpmailer_init', 'my_phpmailer_dkim_cleanup' );
> function my_phpmailer_dkim_cleanup( $phpmailer ) {
> if ( '' == $phpmailer->Sender ) {
> $phpmailer->Sender = $phpmailer->From;
> $phpmailer->AddReplyTo( $phpmailer->From );
> }
> }
> }}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/22837#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list