Mail::MBX - Read MBX mailbox files
use Mail::MBX (); my $mbx = Mail::MBX->open('mailbox.mbx'); while (my $message = $mbx->message) { while ($message->read(my $buf, 4096)) { # Do something with the message body } } $mbx->close;
Mail::MBX provides a reasonable way to read mailboxes in the MBX format, as used by the University of Washington's UW-IMAP reference implementation. At present, only sequential reading is supported, though this is ideal for mailbox format conversion tasks.
Mail::MBX
Mail::MBX->open($file)
Open an MBX mailbox file, returning a new Mail::MBX object.
$mbx->close()
Close the current mailbox object.
$mbx->message()
Return the current MBX message, in the form of a Mail::MBX::Message object, and move the internal file handle to the next message.
Mail::MBX::Message
See Mail::MBX::Message for further details on accessing message contents.
Written by Xan Tronix <xan@cpan.org>
Copyright (c) 2014 cPanel, Inc. Distributed under the terms of the MIT license.
To install Mail::MBX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::MBX
CPAN shell
perl -MCPAN -e shell install Mail::MBX
For more information on module installation, please visit the detailed CPAN module installation guide.