getting logging stuff

master
b3yond 2018-03-29 00:39:45 +02:00
parent 6f3880edad
commit f268fcfd48
1 changed files with 2 additions and 2 deletions

View File

@ -30,9 +30,9 @@ class Mailer(object):
self.s = smtplib.SMTP(config["mail"]["mailserver"])
try:
context = ssl.create_default_context()
self.s.starttls(context=context)
except:
logger.error('Creating SSL Context failed.', exc_info=True)
self.s.starttls(context=context)
logger.error('StartTLS failed.', exc_info=True)
self.s.login(config["mail"]["user"], config["mail"]["passphrase"])
def send(self, text, recipient, subject, attachment=None):