master
ifiguero 2022-01-21 19:47:05 -03:00
parent 320de5bd89
commit 8cb5b9af63
1 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,7 @@ async def enviarCorreosDominio(dominioid):
smtp = aiosmtplib.SMTP(hostname=str(dbdireccion.ipaddr), source_address=banner_hostname, port=465, use_tls=True, validate_certs=True, client_cert=certfile, client_key=keyfile, cert_bundle=cacerts, timeout=10) smtp = aiosmtplib.SMTP(hostname=str(dbdireccion.ipaddr), source_address=banner_hostname, port=465, use_tls=True, validate_certs=True, client_cert=certfile, client_key=keyfile, cert_bundle=cacerts, timeout=10)
await smtp.connect() await smtp.connect()
conectado = True conectado = True
await log.debug('Conectado a USE_TLS: {}'.format(dbdireccion.ipaddr))
except Exception as e: except Exception as e:
conectado = False conectado = False
await log.debug('Error al conectar al servidor use_tls: {}'.format(e)) await log.debug('Error al conectar al servidor use_tls: {}'.format(e))
@ -60,6 +61,7 @@ async def enviarCorreosDominio(dominioid):
await smtp.connect() await smtp.connect()
await smtp.starttls() await smtp.starttls()
conectado = True conectado = True
await log.debug('Conectado a START_TLS: {}'.format(dbdireccion.ipaddr))
except Exception as e: except Exception as e:
conectado = False conectado = False
await log.debug('Error al conectar al servidor start_tls: {}'.format(e)) await log.debug('Error al conectar al servidor start_tls: {}'.format(e))
@ -69,6 +71,7 @@ async def enviarCorreosDominio(dominioid):
await smtp.connect() await smtp.connect()
await smtp.helo(banner_hostname) await smtp.helo(banner_hostname)
conectado = True conectado = True
await log.debug('Conectado a capela: {}'.format(dbdireccion.ipaddr))
except Exception as e: except Exception as e:
conectado = False conectado = False
await log.debug('Error al conectar al servidor {}: {}'.format(dbdireccion.ipaddr, e)) await log.debug('Error al conectar al servidor {}: {}'.format(dbdireccion.ipaddr, e))