The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mail::POP3::Folder::mbox::parse_to_disk - class that handles an mbox-format mailbox for POP3, storing messages on disk and not in memory

SYNOPSIS

    my $mailbox = Mail::POP3::Folder::mbox::parse_to_disk->new(
        $user_id,
        $mbox_path,
        '^From ',
        '^\\s*$',
        $tmpdir,
    );
    die "Could not acquire lock\n" unless $mailbox->lock_acquire;
    $mailbox->uidl_list(\*STDOUT);
    print $mailbox->uidl(2), "\n";
    $mailbox->delete(2);
    $mailbox->top(3, \*STDOUT, 2);
    $mailbox->retrieve(3, \*STDOUT);
    print $mailbox->octets(1), "\n";
    $mailbox->flush_delete;
    $mailbox->lock_release;

DESCRIPTION

This class manages an mbox-format mailbox in accordance with the requirements of a POP3 server. It stores the messages therein as individual temporary files rather than in memory. It is otherwise entirely compatible with Mail::POP3::Folder::mbox.

The new method takes one extra parameter, $tmpdir, which is the location of the temporary files into which the messages are placed.

SEE ALSO

RFC 1939, Mail::POP3.