Mail::POP3::Folder::mbox::parse_to_disk - class that handles an mbox-format mailbox for POP3, storing messages on disk and not in memory
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;
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.
new
$tmpdir
RFC 1939, Mail::POP3.
To install Mail::POP3, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::POP3
CPAN shell
perl -MCPAN -e shell install Mail::POP3
For more information on module installation, please visit the detailed CPAN module installation guide.