#16 fix starttls
This commit is contained in:
parent
06ac588f74
commit
3563638dab
1 changed files with 1 additions and 1 deletions
|
@ -315,7 +315,7 @@ def send_email(to, subject='diffido', body='', from_=None):
|
||||||
tls_args = {}
|
tls_args = {}
|
||||||
for key in ('ssl_keyfile', 'ssl_certfile', 'ssl_context'):
|
for key in ('ssl_keyfile', 'ssl_certfile', 'ssl_context'):
|
||||||
if key in args:
|
if key in args:
|
||||||
tls_args[key] = (args[key] or '').replace('ssl_', '')
|
tls_args[key.replace('ssl_', '')] = args[key]
|
||||||
del args[key]
|
del args[key]
|
||||||
with smtplib.SMTP(**args) as s:
|
with smtplib.SMTP(**args) as s:
|
||||||
if starttls:
|
if starttls:
|
||||||
|
|
Loading…
Reference in a new issue