rhxk has asked for the wisdom of the Perl Monks concerning the following question:
All it prints in mynewmail.log is:#!/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);
But interestingly, it prints the true headers in the audit.logfrom is to is subj is body is < the body is here >
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: parsing email by Mail::Audit
by Zed_Lopez (Chaplain) on Oct 31, 2005 at 23:48 UTC | |
by rhxk (Beadle) on Nov 01, 2005 at 01:21 UTC |