#!/usr/bin/perl BEGIN{ unshift @INC, '/home/rob/lib/perl5/site_perl/5.8.3'; unshift @INC, '/home/rob/lib/perl5/5.8.3' } $\ = "\n"; select(STDERR); $| = 1; select(STDOUT); $| = 1; use warnings; use Mail::Audit; $mail = Mail::Audit->new(emergency=>"/home/rob/emergency_mbox",log=>"/home/rob/audit.log",loglevel=>4); $from = $mail->from; $to = $mail->to; $subject = $mail->subject; @body = @{$mail->body}; #chomp($from, $to, $subject); open(FILE, ">> /home/rob/mynewmail.log"); print FILE "from is $from"; print FILE "to is $to"; print FILE "subj is $subject"; print FILE "body is @body"; close(FILE); #### from is to is subj is body is < the body is here >