Re: logging module, SMTPHandler and gmail in python 2.6

2009-12-06 Thread Vinay Sajip
On Dec 4, 12:31 pm, mynthon wrote: Thank you for this suggestion. Ideally, you would have created an issue for this on bugs.python.org, because then it would be more likely to be acted upon. I've implemented this feature in r76691 (in Python trunk and py3k) in a more general way. It works by spe

logging module, SMTPHandler and gmail in python 2.6

2009-12-04 Thread mynthon
You cannot use gmail account for sending emails with logging module. It is because google requires TLS connection and logging module doesn't support it. To use gmail you have to extend logging.handlers.SMTPHandler class and override SMTPHandler.emit() method. Here is source code. (There really sho