diff --git a/core/includes/mail.inc b/core/includes/mail.inc
index cf45ca5..23817a2 100644
--- a/core/includes/mail.inc
+++ b/core/includes/mail.inc
@@ -152,11 +152,16 @@ function drupal_mail($module, $key, $to, $language, $params = array(), $from = N
   }
   $message['headers'] = $headers;
 
+  // Find the callback we need to build the e-mail from hook_message_info().
+  if (module_hook($module, 'message_info')) {
+    $info = module_invoke($module, 'message_info');
+    $callback = $info['callback'];
+  }
+
   // Build the e-mail (get subject and body, allow additional headers) by
-  // invoking hook_mail() on this module. We cannot use module_invoke() as
-  // we need to have $message by reference in hook_mail().
-  if (function_exists($function = $module . '_mail')) {
-    $function($key, $message, $params);
+  // calling the message callback given by this module.
+  if (function_exists($callback)) {
+    $callback($key, $message, $params);
   }
 
   // Invoke hook_mail_alter() to allow all modules to alter the resulting e-mail.
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index f1ddbbc..ac1233f 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -2591,7 +2591,43 @@ function user_build_content($account, $view_mode = 'full', $langcode = NULL) {
 }
 
 /**
- * Implements hook_mail().
+ * Implements hook_message_info().
+ */
+function user_message_info() {
+  return array(
+    'status_activated' => array(
+      'callback' => 'user_mail',
+    ),
+    'cancel_confirm' => array(
+      'callback' => 'user_mail',
+    ),
+    'register_admin_created' => array(
+      'callback' => 'user_mail',
+    ),
+    'register_no_approval_required' => array(
+      'callback' => 'user_mail',
+    ),
+    'register_pending_approval' => array(
+      'callback' => 'user_mail',
+    ),
+    'register_pending_approval_admin' => array(
+      'callback' => 'user_mail',
+    ),
+    'password_reset' => array(
+      'callback' => 'user_mail',
+    ),
+    'status_blocked' => array(
+      'callback' => 'user_mail',
+    ),
+    'status_canceled' => array(
+      'callback' => 'user_mail',
+    ),
+  );
+}
+
+
+/**
+ * Mail callback for user module e-mails.
  */
 function user_mail($key, &$message, $params) {
   $language = $message['language'];
