is there a suitable code for blocking all registered users' outgoing email but only the admin receives all emails. I need a send all emails to admin only situation.
Mail sent from WP uses
wp_mail() function. There is a filter that you can use before the mail is sent to filter the arguments used in the
wp_mail() function, including the $to value.
Look at the example code on that page to get an idea of how to block (or redirect) all mail sent by
wp_mail(). You could put your implementation of that in your Child Theme's functions file, or your own private plugin.
It is possible that a plugin or a theme might not use the
wp_mail() function, using instead
mail() or their own implementation of phpMailer (which