git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
use the SMTP library as advertised
[plcapi.git]
/
PLC
/
sendmail.py
diff --git
a/PLC/sendmail.py
b/PLC/sendmail.py
index
86cee36
..
d4a0a2a
100644
(file)
--- 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 "