use system's CA certificates for Python 2.7.9 or higher to verify TLS connection
This commit is contained in:
parent
d70eb160b9
commit
f47df75422
@ -64,7 +64,7 @@ class SMTP(object):
|
||||
timeout=self.conf.getint('timeout'))
|
||||
|
||||
if self.conf.get('security') == 'starttls':
|
||||
if sys.version_info >= (3, 4):
|
||||
if sys.version_info >= (3, 4) or (2, 7, 9) <= sys.version_info <= (3, 0):
|
||||
import ssl
|
||||
self.client.starttls(context=ssl.create_default_context())
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user