--- orig/user.module	2007-01-29 20:08:46.000000000 +0100
+++ user.module	2007-07-10 18:22:28.000000000 +0200
@@ -1263,8 +1262,8 @@ function user_register_submit($form_id, 
       $subject = $notify ? _user_mail_text('admin_subject', $variables) : _user_mail_text('welcome_subject', $variables);
       $body = $notify ? _user_mail_text('admin_body', $variables) : _user_mail_text('welcome_body', $variables);
 
-      drupal_mail(($notify ? 'user-register-notify' : 'user-register-welcome'), $mail, $subject, $body, $from);
-
+      $mail_success = drupal_mail(($notify ? 'user-register-notify' : 'user-register-welcome'), $mail, $subject, $body, $from);
+     if ($mail_success) {
       if ($notify) {
         drupal_set_message(t('Password and further instructions have been e-mailed to the new user %user.', array('%user' => $name)));
       }
@@ -1272,6 +1271,12 @@ function user_register_submit($form_id, 
         drupal_set_message(t('Your password and further instructions have been sent to your e-mail address.'));
         return '';
       }
+     }
+     else {
+       watchdog('user', t('Error mailing activation message to new user! E-mail: ') . $mail, WATCHDOG_ERROR);
+       drupal_set_message(t('Unable to send mail. Please contact the site admin.'));
+       return '';
+     }
     }
     else {
       // Create new user account, administrator approval required.
