--- original/mail.inc	2007-07-02 16:41:35.000000000 +0200
+++ mail.inc	2007-08-22 19:57:21.000000000 +0200
@@ -126,6 +126,12 @@ function drupal_mail($module, $key, $to,
   // Optionally send e-mail.
   if ($send) {
     $message['result'] = drupal_mail_send($message);
+
+    // Log errors
+    if (!$message['result']) {
+      watchdog('mail', 'Error sending e-mail (from %from to %to).', array('%from' => $message['from'], '%to' => $message['to']), WATCHDOG_ERROR);
+      drupal_set_message(t('Unable to send e-mail. Please contact the site admin, if the problem persists.'));
+    }
   }
 
   return $message;
