From a28661c5c5229010a4574ee4b9dcbeb4b7717496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Mon, 31 May 2010 10:04:49 +0000 Subject: [PATCH] connect should not be called with '' git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35775 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/tests/sendMail.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/product/ERP5Type/tests/sendMail.py b/product/ERP5Type/tests/sendMail.py index 1f2104db7a..e4b182fe5b 100644 --- a/product/ERP5Type/tests/sendMail.py +++ b/product/ERP5Type/tests/sendMail.py @@ -80,7 +80,10 @@ def sendMail(subject, 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() -- 2.30.9