armin / mbox-parser
PHP library to parse mbox files to email messages.
Installs: 6 695
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 2
Open Issues: 1
Requires
- php: >=7.3
- doctrine/collections: ^1.7 | ^2.1
- zbateson/mail-mime-parser: ^2.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.4
- jangregor/phpstan-prophecy: ^1.0
- phpstan/phpstan: ^1.8
- phpunit/phpunit: ^9.5
README
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
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.