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()