Hi @twirlist
Unfortunately, this requires customization on your end. We don’t have a custom code for this at this moment so let’s see if others in the forum have done something similar and share their solution here.
Regards,
@twirlist
You can try this code snippet:
add_filter( 'wp_mail', 'my_custom_add_email_address', 10, 1 );
function my_custom_add_email_address( $args ) {
if( $args['subject'] == 'Reset your password' ) {
$args['headers'] .= 'Cc: ' . stripslashes( get_option( 'blogname' )) . ' <[email protected]>' . "\r\n";
}
return $args;
}
Change the subject if you have another text than ‘Reset your password’.
I had problems receiving the CC email when From email adress equals CC address.
Maybe it’s an issue with my email client.
Test and change the CC address: ‘ <[email protected]>’
Installation add to your child-theme functions.php file
or add to the “Code Snippets” plugin
https://ww.wp.xz.cn/plugins/code-snippets/
Thank you missveronica for your input.
I really appreciate that.
I tried your code in my functions.php and really worked :))
Just a tiny thought if you know.. is it possible to change from Cc to Bcc? Will this work?
Just it would be even better to “hide” the cc email address and instead use the Bcc for this.
If you know how to edit the code just only on this it would be perfect. Otherwise I’m satisfied as it is now as well!
Thanks again for your valuable input.
Hey!
It worked as well 🙂
Just replaced by (logic) the ‘Cc’ to ‘Bcc’ and it worked!
The email that is sent to admin does not show this time to the recipient / registered user.
I think now it’s perfect.
Thanks again @missveronicatv and have a nice day!
@twirlist
Yes you can change the Cc: to Bcc: in this line:
$args['headers'] .= 'Cc: ' . stripslashes( get_option( 'blogname' )) . ' <[email protected]>' . "\r\n";
Reference:
https://developer.ww.wp.xz.cn/reference/functions/wp_mail/#valid-address-formats