File: email-exit-helper.pl

package info (click to toggle)
liblog-dispatch-perl 2.71-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 560 kB
  • sloc: perl: 1,457; sh: 24; makefile: 2
file content (17 lines) | stat: -rwxr-xr-x 368 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use strict;
use warnings;

use Log::Dispatch::Email::MailSend;

Mail::Mailer->import( sendmail => 't/sendmail' );

my $email = Log::Dispatch::Email::MailSend->new(
    name      => 'email',
    min_level => 'emerg',
    to        => 'foo@example.com',
    subject   => 'Log this',
);

$email->log( message => 'Something bad is happening', level => 'emerg' );

exit 5;