Can anyone suggest a way of capturing the output from smtplib's set_debuglevel into a list or dictionary (or anything else I can work with), Preferably not to a file, though if this is the only way, then it would be a start I have googled. TIA