Log-Log4perl-Appender-SMTP

 view release on metacpan or  search on metacpan

lib/Log/Log4perl/Appender/SMTP.pm  view on Meta::CPAN

use Carp;
use Net::Domain 'hostfqdn';
use Net::SMTP;

our $VERSION = '0.04';

sub new {
	my($class, @options) = @_;

	my $hname = hostfqdn() || '<unknown>';
	my $user  = getlogin || getpwuid($<) || 'log4perl';

	return bless {
		from    => $user.'@'.$hname,
		to      => 'postmaster',
		subject => "Subject: Log4perl from $hname\n",
		Host    => 'localhost',
		@options
	}, $class;
}



( run in 0.282 second using v1.01-cache-2.11-cpan-8d75d55dd25 )