Log::Agent::Driver::Mail(3pm)

Log::Agent::Driver::Mail3pm

Email driver for log::agent

Usage

 use Log::Agent;
 require Log::Agent::Driver::Mail;
 my $driver = Log::Agent::Driver::Mail->make(
     -to      => '[email protected]',
     -cc      => [ qw( [email protected] admin@example,net ) ],
     -subject => "ALERT! ALERT!",
     -mailer  => [ 'smtp', Server => 'mail.example.net' ]
 );
 logconfig(-driver => $driver);

Overview

This driver maps the logxxx() calls to email messages. Each call generates a separate email message. The Mail::Mailer module is required.

Constructor

make OPTIONS

The OPTIONS argument is a hash with the following keys:

-prefix

An optional prefix for the message body.

-to

The destination addresses, may be a scalar containing a valid email address or a reference to an array of addresses.

-reply_to

The reply-to addresses, may be a scalar containing a valid email address or a reference to an array of addresses.

-from

The source address, must be a scalar containing a valid email address.

-subject

The subject line of the email message.

-cc

The carbon copy addresses, may be a scalar containing a valid email address or a reference to an array of addresses.

-bcc

The blind carbon copy addresses, may be a scalar containing a valid email address or a reference to an array of addresses.

-priority

The priority level for the email message. This is NOT related to the logging priority.

-mailer

A reference to an array containing the optional arguments to Mail::Mailer->new(). Generally, this can be omitted.

Notes

Thanks to Shirley Wang for the idea for this module.

Releases

11 releases since Debian 3.1 (Sarge); the text changed 6 times.

  1. 3.1
  2. 4.0–5.0
  3. 6.0–7
  4. 8
  5. 9–10
  6. 11
  7. 12–13

Author

Mark Rogaski <[email protected]>

License

Copyright (C) 2002 Mark Rogaski; all rights reserved.

See Log::Agent(3) or the README file included with the distribution for license information.

From liblog-agent-perl 1.005-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.