(solved) smtplib, capturing output from set_debuglevel ??
steve at holdenweb.com
Mon Oct 11 14:16:01 CEST 2004
Tim Williams wrote:
> ----- Original Message -----
> From: "Tim Williams" <listserver at tdw.net>
>>----- Original Message -----
>>From: "Steve Holden" <steve at holdenweb.com>
>>Yeah, I did wonder about changing the code (though it's not my first
>>choice. I've done it before and caught a crab later), or could I do it
[...Tim fixes smtplib...]
> Took me about 4 minutes !!
> now I can call s.debug() and get a list containing the debug information.
> s.debug() can be called at anytime including after s.quit()
> As a side benefit, I can use s.do_debug( msg ) at any time to get the
> program to add (comment) lines to the debug information. This will be
> useful when reading the full retrieved debug information at a later date.
> set_debuglevel() works exactly as it did before.
> I have to tidy up the formatting/handling of the messages, and I think I'm
> going to add an option to retrieve the debug information without the
> message data (as its usually superfluous to the debugging process) , but
> other than that it does just what I need already.
> Is it worth asking for something like this to be added permanently to
> smtplib, I can't be the only one that needs to log outgoing smtp
> conversations, or debug to a file/log ?
> Thanks for everyone's help
Correct action under these circumstances would be to submit a patch.
This sounds intimidating of you've never done it before, but the process
isn;t that difficult once you've created your SourceForgew account, and
there are meny experienced hands on the list who will help you if you
Holden Web LLC +1 800 494 3119
More information about the Python-list