Skip to content

Commit

Permalink
Add further debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
TheByronHimes committed Sep 5, 2024
1 parent 9faff59 commit d2fec06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ns/adapters/outbound/smtp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit d2fec06

Please sign in to comment.