armin/mbox-parser

PHP library to parse mbox files to email messages.

1.0.2 2022-11-04 12:42 UTC

This package is auto-updated.

Last update: 2023-03-04 13:35:42 UTC


README

PHP library to parse mbox files to email messages. The mail messages 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

Requirements

  • PHP 7.3 or higher

Usage

<?php

$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.