Author pepoluan
Recipients barry, hpkkumar007, pepoluan, r.david.murray
Date 2021-01-12.05:02:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610427723.24.0.302097794481.issue41868@roundup.psfhosted.org>
In-reply-to
Content
Will patching smtplib.SMTP._print_debug do?

You can subclass from smtplib.SMTP this way:

class MySMTPClient(smtplib.SMTP):
    def __init__(self, *args, logger=None, **kwargs):
        super().__init__(*args, **kwargs)
        self.logger = logger
    def _print_debug(self, *args):
        if self.logger:
            self.logger.debug(" ".join(args))
        super()._print_debug(*args)
History
Date User Action Args
2021-01-12 05:02:03pepoluansetrecipients: + pepoluan, barry, r.david.murray, hpkkumar007
2021-01-12 05:02:03pepoluansetmessageid: <1610427723.24.0.302097794481.issue41868@roundup.psfhosted.org>
2021-01-12 05:02:03pepoluanlinkissue41868 messages
2021-01-12 05:02:02pepoluancreate