Log::Dispatch::Email::MIMELite - Subclass of Log::Dispatch::Email that uses the MIME::Lite module
use Log::Dispatch::Email::MIMELite;
my $email =
Log::Dispatch::Email::MIMELite->new
( name => 'email',
min_level => 'emerg',
to => [ qw( foo@bar.com bar@baz.org ) ],
subject => 'Oh no!!!!!!!!!!!', );
$email->log( message => "Something bad is happening\n", level => 'emerg' );
This is a subclass of Log::Dispatch::Email that implements the send_email method using the MIME::Lite module.
This method takes a hash of parameters. The following options are valid:
This parameter may be a single subroutine reference or an array reference of subroutine references. These callbacks will be called in the order they are given and passed a hash containing the following keys:
( message => $log_message, level => $log_level )
The callbacks are expected to modify the message and then return a
single scalar containing that modified message. These callbacks will
be called when either the log or log_to methods are called and
will only be applied to a given message once.
Dave Rolsky, <autarch@urth.org>