Fix - al enviar correo

This commit is contained in:
Mauricio Baeza 2018-01-16 10:12:53 -06:00
parent fe949de513
commit 6125623c5f
2 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -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: