Pandu E POLUAN added the comment:
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 _pr
New submission from KK Hiraskar :
Currently "smtplib" is directly printing data to stdout/stderr, and not getting
any good way to get this data in to the logs written by "logging"
please provide an option to achieve this.
--
components: email
messages: 377537
nosy: barry, hpkkumar007,