From 6125623c5f39814e4a6bc21fad20978f8de70e87 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Tue, 16 Jan 2018 10:12:53 -0600 Subject: [PATCH] Fix - al enviar correo --- source/app/controllers/helper.py | 4 +++- source/app/controllers/util.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/app/controllers/helper.py b/source/app/controllers/helper.py index ab9eb71..122828a 100644 --- a/source/app/controllers/helper.py +++ b/source/app/controllers/helper.py @@ -263,7 +263,9 @@ class SendMail(object): def _login(self): try: - if self._config['ssl'] and 'gmail' or 'outlook' in self._config['servidor']: + if self._config['ssl'] and ( + 'gmail' in self._config['servidor'] or + 'outlook' in self._config['servidor']): self._server = smtplib.SMTP( self._config['servidor'], self._config['puerto'], timeout=10) diff --git a/source/app/controllers/util.py b/source/app/controllers/util.py index 8789fc8..d235ff1 100644 --- a/source/app/controllers/util.py +++ b/source/app/controllers/util.py @@ -20,7 +20,7 @@ import zipfile from io import BytesIO from pathlib import Path -from smtplib import SMTPException, SMTPAuthenticationError +# ~ from smtplib import SMTPException, SMTPAuthenticationError from xml.etree import ElementTree as ET try: