Index: src/wp-admin/user-new.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/wp-admin/user-new.php	(revision f326f7ebfb50352ea77c28dcf75b3a080b2f56d8)
+++ src/wp-admin/user-new.php	(date 1568985379000)
@@ -59,7 +59,7 @@
 	}
 
 	// Adding an existing user to this blog
-	$new_user_email = $user_details->user_email;
+	$new_user_email['to'] = $user_details->user_email;
 	$redirect       = 'user-new.php';
 	$username       = $user_details->user_login;
 	$user_id        = $user_details->ID;
@@ -116,28 +116,37 @@
 			$message = __(
 				'Hi,
 
-You\'ve been invited to join \'%1$s\' at
-%2$s with the role of %3$s.
-
-Please click the following link to confirm the invite:
-%4$s'
+                You\'ve been invited to join \'%1$s\' at
+                %2$s with the role of %3$s.
+                
+                Please click the following link to confirm the invite:
+                %4$s'
 			);
 
-			wp_mail(
-				$new_user_email,
-				sprintf(
-					/* translators: Joining confirmation notification email subject. %s: Site title. */
-					__( '[%s] Joining Confirmation' ),
-					wp_specialchars_decode( get_option( 'blogname' ) )
-				),
-				sprintf(
-					$message,
-					get_option( 'blogname' ),
-					home_url(),
-					wp_specialchars_decode( translate_user_role( $role['name'] ) ),
-					home_url( "/newbloguser/$newuser_key/" )
-				)
-			);
+			$new_user_email['message'] = $message;
+			$new_user_email['subject'] = sprintf( __( '[%s] Joining confirmation' ), wp_specialchars_decode( get_option( 'blogname' ) ) );
+ 	        $new_user_email['message'] = sprintf( $message, get_option( 'blogname' ), home_url(), wp_specialchars_decode( translate_user_role( $role['name'] ), home_url( "/newbloguser/$newuser_key/" ) ) );
+
+ 	        /**
+             * Filters the contents of the email sent when a new user is added.
+			 *
+			 * @since
+			 *
+			 * @param array $new_user_email {
+			 *            Used to build wp_mail().
+			 *            @type string $to      The intended recipients. Add emails in a comma separated string.
+			 *            @type string $subject The subject of the email.
+			 *            @type string $message The content of the email.
+			 *        }
+			 * @param array $user_id     The invided user's ID
+			 * @param array $role        The role of invited user.
+             * @param string $newuser_key The key of the invitation.
+			 *
+			 */
+
+ 	         $new_user_email = apply_filters('new_user_emails',$new_user_email, $user_id, $role, $newuser_key);
+
+ 	         wp_mail( $new_user_email['to'], $new_user_email['subject'], $new_user_email['message'] );
 
 			if ( $switched_locale ) {
 				restore_previous_locale();
