From 3563638dab87c3e06b405423019867d0dec91c5a Mon Sep 17 00:00:00 2001 From: Davide Alberani Date: Mon, 11 Oct 2021 20:54:46 +0200 Subject: [PATCH] #16 fix starttls --- diffido.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diffido.py b/diffido.py index 4e23a1f..b1969ae 100755 --- a/diffido.py +++ b/diffido.py @@ -315,7 +315,7 @@ def send_email(to, subject='diffido', body='', from_=None): tls_args = {} for key in ('ssl_keyfile', 'ssl_certfile', 'ssl_context'): if key in args: - tls_args[key] = (args[key] or '').replace('ssl_', '') + tls_args[key.replace('ssl_', '')] = args[key] del args[key] with smtplib.SMTP(**args) as s: if starttls: