logging.handlers.SMTPHandler question

Vinay Sajip vinay_sajip at yahoo.co.uk
Thu Sep 24 03:37:49 EDT 2009


On Sep 24, 4:14 am, akonsu <ako... at gmail.com> wrote:
> hello,
>
> SMTPHAndler seems to email every single record separately. is there a
> way to collect all log output and then send it in a single email
> message? or do i have to do it manually?
>

You can use a buffering SMTP handler, see:

http://gist.github.com/192587

I haven't tested this code - I got it from this page (Polish
language):

http://python.pinger.pl/m/552751/bufferingsmtphandler



More information about the Python-list mailing list