NAME

Mail::Folder::FastReader - A fast mailbox reader

SYNOPSIS

use Mail::Folder::FastReader qw( read_email reset_file );

open MAILBOX,"saved-mail";
reset_file(MAILBOX);
while (1)
{
  my ($status, $email, $line_number) = read_email();
  last unless $status

  print <<EOF;
EMAIL STARTING ON LINE $line_number:
$email
-------------------------------------
EOF
}
close MAILBOX;

DESCRIPTION

This module provides a simple and fast way to read unix-style mailboxes. It basically searches for the next line that begins with "From ", but which doesn't follow a "----- Begin Included Message -----".

FUNCTIONS

($status,$email,$line) = read_email()

Read the next email from the filehandle, storing the email in $email and the line number in $line. The status is 1 if successful, and 0 if not.

reset_file(FILEHANDLE)

Reset the internal line counter and the reference to the filehandle. Call this before calling read_email().

AUTHOR

David Coppit <david@coppit.org>

SEE ALSO

grepmail, mail(1), printmail(1), Mail::Internet(3) Crocker, D. H., Standard for the Format of Arpa Internet Text Messages, RFC822.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 259:

You forgot a '=back' before '=head1'