--- moin-1.6.0/MoinMoin/mail/sendmail.py	2007-10-26 00:40:26.000000000 +0300
+++ moin/modatut/sendmail.py	2008-04-04 01:02:50.000000000 +0300
@@ -84,7 +84,7 @@
 
     # Create message headers
     # Don't expose emails addreses of the other subscribers, instead we
-    # use the same mail_from, e.g. u"Jürgen Wiki <noreply@mywiki.org>"
+    # send each email invidually
     address = encodeAddress(mail_from, charset)
     msg['From'] = address
     msg['To'] = address
@@ -92,12 +92,13 @@
     msg['Message-ID'] = make_msgid()
     msg['Subject'] = Header(subject, charset)
 
-    if cfg.mail_sendmail:
-        # Set the BCC.  This will be stripped later by sendmail.
-        msg['BCC'] = ','.join(to)
-        # Set Return-Path so that it isn't set (generally incorrectly) for us.
-        msg['Return-Path'] = address
-
+    sent_ok = 0
+    sent_fail = 0
+    sent_fail_msg = "OK"
+
+    for subscriber in to:
+        del msg['To']
+        msg['To'] = subscriber
     # Send the message
     if not cfg.mail_sendmail:
         try:
@@ -115,7 +116,8 @@
                     except:
                         pass
                     server.login(user, pwd)
-                server.sendmail(mail_from, to, msg.as_string())
+                    server.sendmail(mail_from, subscriber, msg.as_string())
+                    sent_ok+=1
             finally:
                 try:
                     server.quit()
@@ -123,12 +125,14 @@
                     # in case the connection failed, SMTP has no "sock" attribute
                     pass
         except smtplib.SMTPException, e:
-            return (0, str(e))
+                sent_fail+=1
+                sent_fail_msg=str(e)
         except (os.error, socket.error), e:
-            return (0, _("Connection to mailserver '%(server)s' failed: %(reason)s", formatted=False) % {
+                sent_fail+=1
+                sent_fail_msg = _("Connection to mailserver '%(server)s' failed: %(reason)s", formatted=False) % {
                 'server': cfg.mail_smarthost,
                 'reason': str(e)
-            })
+                }
     else:
         try:
             sendmailp = os.popen(cfg.mail_sendmail, "w")
@@ -136,9 +140,20 @@
             sendmailp.write(msg.as_string())
             sendmail_status = sendmailp.close()
             if sendmail_status:
-                return (0, str(sendmail_status))
+                    sent_fail+=1
+                    sent_fail_msg=str(sendmail_status)
+                else:
+                    sent_ok+=1
         except:
-            return (0, _("Mail not sent", formatted=False))
+                sent_fail+=1
+                sent_fail_msg=_("Mail not sent", formatted=False)
+
+    if sent_ok==0:
+        return (0, _("%(ok)s messages ok, %(fail)s failed, last %(msg)s", formatted=False) % {
+            'fail' : sent_fail,
+            'ok' : sent_ok,
+            'msg' : sent_fail_msg
+        })
 
     return (1, _("Mail sent OK", formatted=False))
 
