Mail::POP3::Folder::mbox - class that handles an mbox-format mailbox for POP3
my $mailbox = Mail::POP3::Folder::mbox->new( $user_id, $mbox_path, '^From ', '^\\s*$', ); 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.
Returns an object.
Acquires a lock on the mailbox.
Releases the lock on the mailbox.
Returns the number of octets in all non-deleted messages.
Returns the number of non-deleted messages.
Actually deletes all messages marked as deleted. Throws an exception if the spool-file was modified since the lock was acquired.
Prints the header and top $body_lines lines of the given message to the given file-handle. It does not produce a final ".$CRLF".
".$CRLF"
Prints the given message to the given file-handle. It does not produce a final ".$CRLF". If $mbox_destined is true, then ends each line with LF, not CRLF, and do not byte-stuff the . character.
$mbox_destined
.
Prints a list of all message numbers and their UIDLs to the given file-handle. It does produce a final ".$CRLF".
Returns the persistent unique ID for the given message.
Returns true if the given message has been marked as deleted.
Returns true if the given message has NOT been marked as deleted and is within the range of messages in the mailbox.
Marks the given message as deleted.
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.