1Log::Dispatch::Email::MUIsMeErLiCtoen(t3r)ibuted Perl DoLcougm:e:nDtiastpiaotnch::Email::MIMELite(3)
2
3
4

NAME

6       Log::Dispatch::Email::MIMELite - Subclass of Log::Dispatch::Email that
7       uses the MIME::Lite module
8

SYNOPSIS

10         use Log::Dispatch::Email::MIMELite;
11
12         my $email =
13             Log::Dispatch::Email::MIMELite->new
14                 ( name => 'email',
15                   min_level => 'emerg',
16                   to => [ qw( foo@bar.com bar@baz.org ) ],
17                   subject => 'Oh no!!!!!!!!!!!', );
18
19         $email->log( message => "Something bad is happening\n", level => 'emerg' );
20

DESCRIPTION

22       This is a subclass of Log::Dispatch::Email that implements the
23       send_email method using the MIME::Lite module.
24

METHODS

26       * new
27           This method takes a hash of parameters.  The following options are
28           valid:
29
30           * name ($)
31                   The name of the object (not the filename!).  Required.
32
33           * min_level ($)
34                   The minimum logging level this object will accept.  See the
35                   Log::Dispatch documentation on Log Levels for more informa‐
36                   tion.  Required.
37
38           * max_level ($)
39                   The maximum logging level this obejct will accept.  See the
40                   Log::Dispatch documentation on Log Levels for more informa‐
41                   tion.  This is not required.  By default the maximum is the
42                   highest possible level (which means functionally that the
43                   object has no maximum).
44
45           * subject ($)
46                   The subject of the email messages which are sent.  Defaults
47                   to "$0: log email"
48
49           * to ($ or \@)
50                   Either a string or a list reference of strings containing
51                   email addresses.  Required.
52
53           * from ($)
54                   A string containing an email address.  This is optional and
55                   may not work with all mail sending methods.
56
57           * buffered (0 or 1)
58                   This determines whether the object sends one email per mes‐
59                   sage it is given or whether it stores them up and sends
60                   them all at once.  The default is to buffer messages.
61
62           * callbacks( \& or [ \&, \&, ... ] )
63                   This parameter may be a single subroutine reference or an
64                   array reference of subroutine references.  These callbacks
65                   will be called in the order they are given and passed a
66                   hash containing the following keys:
67
68                    ( message => $log_message, level => $log_level )
69
70                   The callbacks are expected to modify the message and then
71                   return a single scalar containing that modified message.
72                   These callbacks will be called when either the "log" or
73                   "log_to" methods are called and will only be applied to a
74                   given message once.
75
76       * log_message( level => $, message => $ )
77           Sends a message if the level is greater than or equal to the
78           object's minimum level.
79

AUTHOR

81       Dave Rolsky, <autarch@urth.org>
82
83
84
85perl v5.8.8                       2006-12-20 Log::Dispatch::Email::MIMELite(3)
Impressum