iro/anbieter/smtp.py
changeset 20 0d7ffb9b2c7f
parent 19 fcf8489f1c2f
child 23 0180b538ed74
--- a/iro/anbieter/smtp.py	Mon Nov 23 00:18:04 2009 +0100
+++ b/iro/anbieter/smtp.py	Tue Nov 24 02:02:41 2009 +0100
@@ -16,7 +16,6 @@
 import smtplib
 import ConfigParser
 
-
 class SMTP():
     def __init__(self,config_filename=None,section="smtp"):
         self.config_filename=config_filename
@@ -66,6 +65,8 @@
         self.bStart=True
 
     def sendMail(self,mail,recipients):   
+        import logging
+        logging.debug('SMTP.sendMail(%s,%s)'%(mail,  str(recipients)))
         if not self.bStart:
             self.prepareSMTP()
 
@@ -73,6 +74,8 @@
         
         while len(recipients) > 0:
             tmp_recipients=recipients[:self.max_recipients]
+            mail.content['To']=", ".join(tmp_recipients)
+            logging.debug('self.smtp.sendmail(%s,%s,%s)'%(self.send_from,  str(tmp_recipients), mail.as_string()))
             self.smtp.sendmail(self.send_from,  tmp_recipients, mail.as_string())
             self.updateStatus( arranged=tmp_recipients)
             recipients = recipients[self.max_recipients:]