Log::Dispatch::Email::MailSend - Subclass of Log::Dispatch::Email that uses the Mail::Send module
use Log::Dispatch::Email::MailSend;
my $email = Log::Dispatch::Email::MailSend->new ( name => 'email', min_level => 'emerg', to => [ qw( foo@bar.com bar@baz.org ) ], subject => 'Oh no!!!!!!!!!!!', );
$email->log( message => 'Something bad is happening', level => 'emerg' );
This is a subclass of Log::Dispatch::Email that implements the send_email method using the Mail::Send module.
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>
Log::Dispatch, Log::Dispatch::ApacheLog, Log::Dispatch::Email, Log::Dispatch::Email::MailSendmail, Log::Dispatch::Email::MIMELite, Log::Dispatch::File, Log::Dispatch::Handle, Log::Dispatch::Output, Log::Dispatch::Screen, Log::Dispatch::Syslog