Commit a28661c5 authored by Jérome Perrin's avatar Jérome Perrin

connect should not be called with ''


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35775 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c8c6bf3e
...@@ -80,7 +80,10 @@ def sendMail(subject, ...@@ -80,7 +80,10 @@ def sendMail(subject,
msg.set_payload(body) msg.set_payload(body)
# Send the email via SMTP server. # Send the email via SMTP server.
if smtp_host:
s = smtplib.SMTP(smtp_host)
else:
s = smtplib.SMTP() s = smtplib.SMTP()
s.connect(smtp_host) s.connect()
s.sendmail(from_mail, to_mail, msg.as_string()) s.sendmail(from_mail, to_mail, msg.as_string())
s.close() s.close()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment