--- [EMAIL PROTECTED] wrote:
> All,  I  am looking for a way to send the output of a logfile using
> Mail::Sendmail. Is that possible?  If so can some body give me a high
> level syntax.

my $content;
open LOG, $log or die $!;
{ local $/ = undef;
  $content = <LOG>;
}
close LOG;

$mail{Message} = "Pre-log comments....\n$log\nPost-log comments.\n";
$mail(To} = $address;

sendmail(%mail) or die $Mail::Sendmail::error;


=o)

=====
print "Just another Perl Hacker\n"; # edited for readability =o)
=============================================================
Real friends are those whom, when you inconvenience them, are bothered less by it than 
you are. -- me. =o) 
=============================================================
"There are trivial truths and there are great Truths.
 The opposite of a trival truth is obviously false.
 The opposite of a great Truth is also true."  -- Neils Bohr

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to