So I've managed to change
mail_from used by WP to send e.g. new comment notifications by adding filters like that:
add_filter('wp_mail_from_name', 'get_name'); add_filter('wp_mail_from', 'get_email');
This part is working fine.
My problem is that I want to use gmail address with a plus sign like this one:
firstname.lastname@example.org. The plus sign is legitimate to use in email address. I know
wp_mail is using
phpmailer but that is not a problem as I have successfully sent mails with
phpmailer setting from header to such address.
When the filter sets mail_from to such address nothing is sent. Why would this happen?