From 1750ad45d581e50793866e4a6b419bc7dab04767 Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Fri, 28 May 2021 17:46:52 +0200 Subject: [PATCH] fix message logging --- email_handler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/email_handler.py b/email_handler.py index dea0fdce..b33186d8 100644 --- a/email_handler.py +++ b/email_handler.py @@ -1626,7 +1626,9 @@ def handle(envelope: Envelope) -> str: # but it's possible that some MTA don't send the bounce report correctly # todo: to remove once this issue is understood if mail_from == "<>": - LOG.exception("email from <> to reverse alias %s. \n%s", rcpt_to, msg) + LOG.e( + "email from <> to reverse alias %s. \n%s", rcpt_to, msg.as_string() + ) is_delivered, smtp_status = handle_reply(envelope, copy_msg, rcpt_to) res.append((is_delivered, smtp_status))