承接 armin/mbox-parser 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

armin/mbox-parser

最新稳定版本:2.0.1

Composer 安装命令:

composer require armin/mbox-parser

包简介

PHP library to parse mbox files to email messages.

README 文档

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

Iterate through mbox file

<?php $page = 1; $itemsPerPage = 10; $parser = new \Armin\MboxParser\Parser(); $mailbox = $parser->parse('path/to/file.mbox', $page, $itemsPerPage); // $mailbox only contains the items from given page  foreach ($mailbox as $mailMessage) { // ... }

Get amount of total items in mbox file

<?php $parser = new \Armin\MboxParser\Parser(); $total = $parser->getTotalEntries('path/to/file.mbox');

Get specific mail message

<?php $parser = new \Armin\MboxParser\Parser(); $mailMessage = $parser->getMessageById('path/to/file.mbox', '2026f546d879a98e610829b5dd9d43ba@example.com')

Working with mail message

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

Changelog

2.0.1

  • Fix PHP 8 deprecation

2.0

In version 2.0 of armin/mbox-parser the syntax of parsing mbox files has changed, in order to support pagination for large mbox files. See usage section for details.

Following changes have been applied:

  • Removed getMessageById method in Mailbox class
  • Added getMessageById method to Parser class
  • Added getTotalEntries method to Parser class

统计信息

  • 总下载量: 19.45k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固