X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2Fsendmail.py;fp=PLC%2Fsendmail.py;h=d4a0a2a104e400cdd5bf05a095b80305a029066b;hb=65bbb7d6d29ef7d3b609e1a66ca02cd45239d4f1;hp=86cee368cbea2436196dcc09b9a0d2e6ce84c676;hpb=6bef7b35eec76ff66332cb20f58eb7703c2116f9;p=plcapi.git diff --git a/PLC/sendmail.py b/PLC/sendmail.py index 86cee36..d4a0a2a 100644 --- a/PLC/sendmail.py +++ b/PLC/sendmail.py @@ -93,10 +93,10 @@ def sendmail(api, To, Subject, Body, From=None, Cc=None, Bcc=None): s = SMTP() s.connect() - s.close() rejected = s.sendmail( from_addrs[0], to_addrs, msg.as_string(), rcpt_options=["NOTIFY=NEVER"]) + s.quit() if rejected: raise PLCAPIError("Error sending message to "