From 2ad15d7f3d2e8317fc3cc45af99bc57a764d3963 Mon Sep 17 00:00:00 2001 From: Manu Date: Mon, 6 Jul 2026 23:39:29 +0200 Subject: [PATCH] Add debug logging with full exception details to legacy notify action in SMTP integration (#175781) --- homeassistant/components/smtp/notify.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/smtp/notify.py b/homeassistant/components/smtp/notify.py index f63ce6d2ab8f..4f887ae3b448 100644 --- a/homeassistant/components/smtp/notify.py +++ b/homeassistant/components/smtp/notify.py @@ -321,13 +321,17 @@ class MailNotificationService(SmtpClient, BaseNotificationService): break except SMTPServerDisconnected: _LOGGER.warning( - "SMTPServerDisconnected sending mail: retrying connection" + "SMTPServerDisconnected sending mail: retrying connection", + exc_info=_LOGGER.isEnabledFor(logging.DEBUG), ) with suppress(SMTPException): mail.quit() mail = self.connect() except SMTPException: - _LOGGER.warning("SMTPException sending mail: retrying connection") + _LOGGER.warning( + "SMTPException sending mail: retrying connection", + exc_info=_LOGGER.isEnabledFor(logging.DEBUG), + ) with suppress(SMTPException): mail.quit() mail = self.connect()