From d2fec0648343ecd6b2e638877a75ab2ba743610d Mon Sep 17 00:00:00 2001 From: TheByronHimes Date: Thu, 5 Sep 2024 13:03:45 +0000 Subject: [PATCH] Add further debug statements --- src/ns/adapters/outbound/smtp_client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ns/adapters/outbound/smtp_client.py b/src/ns/adapters/outbound/smtp_client.py index c70dc2e..e8686a7 100644 --- a/src/ns/adapters/outbound/smtp_client.py +++ b/src/ns/adapters/outbound/smtp_client.py @@ -77,6 +77,8 @@ def send_email_message(self, message: EmailMessage): log.debug("Starting the 'send_email_message' function.") try: with self.get_connection() as server: + log.debug("Basic connection acquired with configured host and port.") + if self._config.use_starttls: log.debug("Using SSL") # create ssl security context per Python's Security considerations @@ -97,6 +99,7 @@ def send_email_message(self, message: EmailMessage): log.debug("Skipping auth for SMTP.") # check for a connection + log.debug("Pinging server...") if server.noop()[0] != 250: connection_error = self.ConnectionError() log.critical(connection_error)