iro/anbieter/smtp.py
changeset 19 fcf8489f1c2f
parent 0 a3b6e531f0d2
child 20 0d7ffb9b2c7f
--- a/iro/anbieter/smtp.py	Sun Nov 22 22:14:07 2009 +0100
+++ b/iro/anbieter/smtp.py	Mon Nov 23 00:18:04 2009 +0100
@@ -25,6 +25,7 @@
         self.bTLS=False
         self.bSSL=False
         self.max_recipients=1
+        
 
     def read_basic_config(self,config_filename=None):
         """Read basic options from the config file"""
@@ -50,7 +51,6 @@
         except ValueError:
             self.bSSL=False
 
-
     def prepareSMTP(self):
         if self.bSSL:
             self.smtp = smtplib.SMTP_SSL(self.host,self.port)
@@ -70,14 +70,14 @@
             self.prepareSMTP()
 
         mail.content['From']=self.send_from
+        
         while len(recipients) > 0:
             tmp_recipients=recipients[:self.max_recipients]
-            print tmp_recipients
             self.smtp.sendmail(self.send_from,  tmp_recipients, mail.as_string())
             self.updateStatus( arranged=tmp_recipients)
             recipients = recipients[self.max_recipients:]
         
-        self.smtp.shutdownSMTP()
+        self.shutdownSMTP()
 
 
     def updateStatus(self, arranged=None, failed=None):