PHP library to parse mbox files to email messages.

1.1.1 2023-07-03 10:58 UTC

This package is auto-updated.

Last update: 2024-05-03 12:59:17 UTC


PHP library to parse mbox files (RFC 4155) to email messages.

The mail messages (RFC 2822) are being parsed using the great library zbateson/mail-mime-parser.

armin/mbox-parser is released under MIT license.

Written by Armin Vieweg. Supported by IW Medien GmbH


  • PHP 7.3 or higher



$parser = new \Armin\MboxParser\Parser();
$mailbox = $parser->parse('path/to/file.mbox');

foreach ($mailbox as $mailMessage) {
    // ...

See tests for more examples of how to work with MailMessage.