All emails from WordPress are not going to multiple emails for some reason. They have been entered in separated by commas. However when I check the mail log the recipient list is like this:
[email protected],\[email protected]
Is there any way to stop this?
All emails from WordPress are not going to multiple emails for some reason. They have been entered in separated by commas. However when I check the mail log the recipient list is like this:
[email protected],\[email protected]
Is there any way to stop this?
As you mentioned, it could be a plugin. Tracking that down would require deactivating other plugins and retesting to find out. Tracking down the actual problem is really what you need to do.
However, in absence of actually finding the problem, you may be able to filter out the new line indicator with the following filter (add it to your theme's functions.php):
add_filter( 'wp_mail', 'my_wp_mail_filter' );
function my_wp_mail_filter( $args ) {
$args['to'] = str_replace( '\n', '', $args['to'] );
return $args;
}
This should take the "to" address and run str_replace()
to replace any instances of "\n" with an empty value.