Quantcast
Channel: smtp – WordPress.org Forums
Viewing all articles
Browse latest Browse all 2272

Get Sender and From matching in emails

$
0
0

I am currently using Postman SMTP, but it’s currently replicating the WordPress mail delivery (long story, not going into it here!)

What I have noticed is that the sender, and who it is from differ. I’d like these to match, so that instead of it showing as wordpress@domain.com as the From address, I’d like to match the address that sent it.

I have emails that are sent from user to user, so I can’t set a single address, it needs to check before it sends, and set the Sender and From the same.

I have tried the example below (which I think is fine for WordPress without Postman SMTP installed, but does not make a difference

add_action( 'phpmailer_init', 'fix_my_email_return_path' );

function fix_my_email_return_path( $phpmailer ) {
    $phpmailer->Sender = $phpmailer->From;
}

Any help would be appreciated


Viewing all articles
Browse latest Browse all 2272

Trending Articles