I’ve scoured the web for the solution to this small issue, but I keep getting results that tell me how to customise the notification e-mail not the email address.

I have the admin email address in the WP settings as abc@xyz.tld which is great, but all new user registrations I want to go to a different email address.

e.g.

New user registered, email is sent to def@hij.td

Plugins, themes, etc. need updating, all emails go to JUST abc@xyz.tld

2 s
2

Yes, you can Change email address by using wp_mail function.
You can check this how to do this
http://www.butlerblog.com/2011/07/14/changing-the-wp_mail-from-address-with-a-plugin/

Use this plugin for user management it supports email address when new user registers
https://wordpress.org/plugins/wp-members/

Use this code in your functions.php file.

function so174837_registration_email_alert( $user_id ) {
    $user    = get_userdata( $user_id );
    $email   = $user->user_email;
    $message = $email . ' has registered to your website.';
    wp_mail( 'youremail@example.com', 'New User registration', $message );
}
add_action('user_register', 'so174837_registration_email_alert');

Leave a Reply

Your email address will not be published. Required fields are marked *