Skip to content

Commit

Permalink
add log on relaying success
Browse files Browse the repository at this point in the history
  • Loading branch information
boecks authored Oct 27, 2024
1 parent e980863 commit 8454484
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions smtp2mqtt/smtp2mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def smtp_relay(self, msg, mail_from, rcpt_tos, log_extra):
if config["SMTP_RELAY_USER"]:
relay.login(user=config["SMTP_RELAY_USER"], password=config["SMTP_RELAY_PASS"])
relay.send_message(msg, mail_from, rcpt_tos)
log.info("Successfully relayed email to %s", rcpt_tos, extra=log_extra)
except Exception as e:
log.exception("Failed relaying", extra=log_extra)

Expand Down

0 comments on commit 8454484

Please sign in to comment.