mirror of
https://github.com/home-assistant/core.git
synced 2026-07-12 17:18:04 +01:00
Add debug logging with full exception details to legacy notify action in SMTP integration (#175781)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user