I was led to this post while doing a Google search for a particular email question. Funny thing was that the posted answer references one of my blog posts and my plugin. That's kind of awesome - except that I don't think in this case that really answers the OP.
The question was that all notifications to the admin need to go to the specified email address, EXCEPT one - the new user notification.
My approach to that (provided the process was the WP native registration) would be to use a filter on wp_mail() (which, BTW, has a filter at the end of the entire process).
I would use that filter to look at the content of the message and if it was the email being sent for new user notification, then use the filter to change the "to" address.
In this example, the subject is examined to see if it contains 'New User Registration' which is part of the subject line in the WP default admin notification email. If that is the case, then the "to" email address is changed to the desired address. Otherwise, all other cases pass through the filter untouched.
add_filter( 'wp_mail', 'my_wp_mail_filter' );
function my_wp_mail_filter( $args ) {
// Check the message subject for a known string in the notification email.
if ( strpos( $args['subject'], 'New User Registration' ) ) {
// This is the notification email, so change the "to" address.
$args['to'] = '[email protected]';
}
return $args;
}