[Erp5-report] r35775 jerome - /erp5/trunk/products/ERP5Type/tests/sendMail.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon May 31 12:04:51 CEST 2010


Author: jerome
Date: Mon May 31 12:04:49 2010
New Revision: 35775

URL: http://svn.erp5.org?rev=35775&view=rev
Log:
connect should not be called with ''

Modified:
    erp5/trunk/products/ERP5Type/tests/sendMail.py

Modified: erp5/trunk/products/ERP5Type/tests/sendMail.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/sendMail.py?rev=35775&r1=35774&r2=35775&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/sendMail.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/sendMail.py [utf8] Mon May 31 12:04:49 2010
@@ -80,7 +80,10 @@
         msg.set_payload(body)
 
     # Send the email via SMTP server.
-    s = smtplib.SMTP()
-    s.connect(smtp_host)
+    if smtp_host:
+      s = smtplib.SMTP(smtp_host)
+    else:
+      s = smtplib.SMTP()
+      s.connect()
     s.sendmail(from_mail, to_mail, msg.as_string())
     s.close()




More information about the Erp5-report mailing list