From 53b42b24dded04f051f24a83e3436fbc42374516 Mon Sep 17 00:00:00 2001 From: irl Date: Mon, 22 Jun 2026 13:26:47 +0100 Subject: [PATCH] feat(utils): use logging around email send --- src/utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils.py b/src/utils.py index b314d61..d471cfa 100644 --- a/src/utils.py +++ b/src/utils.py @@ -1,3 +1,5 @@ +import logging + from lettermint import Lettermint, ValidationError from datetime import datetime, timezone from joserfc import jwt, jwk, errors @@ -52,8 +54,6 @@ async def send_email(recipient: str, subject: str, body: str): .text(body) .send() ) - - print(response.status_code) - except ValidationError: - # Error thrown if domain not approved for project - print("Lettermint validation error") + logging.info("Email sent to {} with subject {} (Status: {})".format(recipient, subject, response.status_code)) + except ValidationError as e: + logging.exception(e)