The SMTPHandler class, located in the
logging.handlers module, supports sending logging messages to
an email address via SMTP.
class SMTPHandler( |
mailhost, fromaddr, toaddrs, subject) |
-
Returns a new instance of the SMTPHandler class. The
instance is initialized with the from and to addresses and subject
line of the email. The toaddrs should be a list of strings. To specify a
non-standard SMTP port, use the (host, port) tuple format for the
mailhost argument. If you use a string, the standard SMTP port
is used.
-
Formats the record and sends it to the specified addressees.
-
If you want to specify a subject line which is record-dependent,
override this method.
Release 2.5.2, documentation updated on 21st February, 2008.
See About this document... for information on suggesting changes.
|