Shop Forums WordPress Plugins Error with multiple admin mail Reply To: Error with multiple admin mail

#8275
vinny
Keymaster

Hi Lorenzo,

Sorry for the delay. I didn’t see your message stuck in Pending status. You can try to use the following filter in your functions.php:

function lorenzo_fix_multi_admin_email( $headers, $recipients, $subject, $body ) 
{
	foreach ( $headers as $i => $header )
	{
		if ( preg_match( "/^From:.*?<.*?,.*?>/", $header ) )
		{
			$headers[$i] = preg_replace("/<(.*?),[^>]+>/", "<$1>", $header );
		}
	}
	
	return $headers;
}
add_filter('bbpnns_extra_headers', 'lorenzo_fix_multi_admin_email', 10, 4);