Thanks for helping testing this. You can post noticeable results or comments here: http://drupal.org/node/82499

'; // E-mail ids to test $test = array( 'register_no_approval_required', 'register_admin_created', 'register_pending_approval', 'password_reset', 'status_activated', 'status_blocked', 'status_deleted' ); // Fake include to use mail_wrapper below $conf['smtp_library'] = 'includes/common.inc'; // Prepare parameters $account = user_load(array('uid' => 1)); $account->password = 'fakepasswordfortesting'; $output .= "

Test I: Using _user_mail_notify()

"; foreach ($test as $key) { $result = _user_mail_notify($key, $account, user_language($account)); $output .= theme('box', "Key = $key, result =". ($result ? "sent" : "not sent"), drupal_mail_wrapper()); } $output .= "

Test II: Using directly drupal_mail()

"; $values = array('account' => $account); foreach ($test as $key) { drupal_mail('user', $key, $account->mail, user_language($account), $values); $output .= theme('box', "key = $key", drupal_mail_wrapper()); } $output .= "

Have a nice day!

"; print theme('page', $output); drupal_page_footer(); /** * Mail wrapper for testing */ function drupal_mail_wrapper($mail = NULL) { static $store; if ($mail) { $store = $mail; return TRUE; } else { return '
'.print_r($store, TRUE).'
'; } }