WordPress user data automatically emailed to site owner on registration

Some sites will have additional user data in the registration form, when users register the site owner is notified by email.
For automatic emailing you can use this Code

function new_user_registered($user_id) {
    global $wpdb;
    $admin_email = get_bloginfo('admin_email');

    if (!current_user_can( 'administrator' )){// avoid sending emails when admin is updating user profiles
        $to = $admin_email;
        $subject = 'Hello Admin! You have a new registered user.';
        $message = "The user has registered with the following user meta data:\n";
        foreach($_POST as $key => $value){
            $message .= $key . ': '. $value . '\n';
        wp_mail( $to, $subject, $message);
add_action( 'user_register', 'new_user_registered');

function yoursite_wp_mail_from($content_type) {
  return 'changethis@mydomain.com';

function yoursite_wp_mail_from_name($name) {
  return 'From a Nice Name';