Skip to content

Instantly share code, notes, and snippets.

@Agasper
Agasper / gist:8ef727892f7d8d63e0ac
Created April 28, 2015 15:58
Python logger GMail support (TLS)
import logging
import logging.handlers
class TlsSMTPHandler(logging.handlers.SMTPHandler):
def emit(self, record):
"""
Emit a record.
Format the record and send it to the specified addressees.
"""