PHPackages                             pylesoft/mailbox - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. pylesoft/mailbox

ActiveLibrary

pylesoft/mailbox
================

Multi-provider mailbox abstraction for Laravel

131PHPCI passing

Since Feb 25Pushed 2w agoCompare

[ Source](https://github.com/pylesoft/mailbox)[ Packagist](https://packagist.org/packages/pylesoft/mailbox)[ RSS](/packages/pylesoft-mailbox/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (7)Used By (0)

Pyle Mailbox
============

[](#pyle-mailbox)

[![CI](https://camo.githubusercontent.com/d389a3d5fb120678cfe589fe283d6c18acfc1074cae7afa02d58252d6626d170/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f63692d70617373696e672d627269676874677265656e)](.github/workflows/ci.yml)[![PHPStan](https://camo.githubusercontent.com/8bc2adfcccebe0fb93899de4d2590ec43a47414ec87539d7a16fc65aa5a9fe89/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068707374616e2d6c6576656c253230382d73756363657373)](phpstan.neon.dist)[![PHP](https://camo.githubusercontent.com/344e820b219cee3234648531306104364bd684892ad13c5dc79e66eb82a15b90/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e322532422d626c7565)](https://www.php.net/)[![Laravel](https://camo.githubusercontent.com/53f994a897d083946738e0bc5943400cc950fa40f004eb4ba44bc2385b2f45ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31322e782d726564)](https://laravel.com)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)

**A unified, driver-based mailbox SDK for Laravel.**

What Makes It Great
-------------------

[](#what-makes-it-great)

- **One API, every provider** -- swap between Microsoft 365 and Google Workspace without changing a line of application code.
- **Fluent query builder** -- filter messages by folder, read status, date range, and free-text search with an Eloquent-like syntax.
- **Delta sync built in** -- track changes with provider-native delta tokens so you only process what is new.
- **Typed DTOs everywhere** -- every message, folder, and attachment comes back as a strict, readonly data-transfer object.
- **Retry, rate-limit, and batch** -- resilient HTTP handling with configurable backoff, concurrency locks, and queue-aware retry strategies.
- **Rule matching engine** -- evaluate inbound messages against user-defined filter rules with `MessageMatcher` and expose filterable fields to your UI.

Quick Look
----------

[](#quick-look)

```
use Pyle\Mailbox\Facades\Mailbox;
use Pyle\Mailbox\Enums\WellKnownFolder;

$invoices = Mailbox::mailbox('invoices@acme.com')
    ->messages()
    ->inFolder(WellKnownFolder::INBOX)
    ->where('isRead', false)
    ->take(25)
    ->get(); // Collection
```

Five lines of code -- that is all it takes to pull the 25 most recent unread messages from any supported provider. Mailbox handles authentication, pagination, and provider-specific quirks behind the scenes so you can focus on what your application does with those messages.

Supported Drivers
-----------------

[](#supported-drivers)

DriverKeyAuth ModelMicrosoft 365 (Graph API)`ms-graph`Client credentials with mailbox-scoping policiesGoogle Workspace (Gmail API)`gmail`Service-account delegation or user OAuth> **Tip** The alias key `google-workspace` resolves to the `gmail` driver, so you can use whichever name feels more natural in your configuration.

Documentation
-------------

[](#documentation)

Full documentation lives in the [`docs/`](docs/introduction.md) directory. Here are the pages you will reach for most often:

- [Installation](docs/installation.md) -- requirements, Composer setup, publishing config and migrations.
- [Configuration](docs/configuration.md) -- every option in `config/mailbox.php`, explained.
- [Quickstart](docs/quickstart.md) -- a working example in under two minutes.
- [Messages](docs/messages.md) -- querying, reading, moving, and deleting messages.
- [Authentication](docs/authentication/ms-graph.md) -- provider-specific credential setup for MS Graph and Gmail.

Contributing
------------

[](#contributing)

1. Create a feature branch from the latest default branch.
2. Implement changes with tests and documentation updates where applicable.
3. Run the full quality suite:

```
vendor/bin/pest
vendor/bin/phpstan analyse
vendor/bin/pint --test
```

4. Open a pull request with a clear summary, migration impact, and validation notes.

CI runs on PHP 8.2, 8.3, and 8.4 with latest dependencies, plus a PHP 8.2 prefer-lowest lane.

License
-------

[](#license)

Mailbox is open-source software licensed under the [MIT license](LICENSE).

###  Health Score

26

↑

LowBetter than 46% of packages

Maintenance63

Regular maintenance activity

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/06abf3ec43b9436d5233e60d8f66aee65e0f93f23b68c3d201023cfc192e80ea?d=identicon)[ianfortier](/maintainers/ianfortier)

---

Top Contributors

[![ianfortier](https://avatars.githubusercontent.com/u/2520657?v=4)](https://github.com/ianfortier "ianfortier (27 commits)")

---

Tags

gmaillaravelms-graphphp

### Embed Badge

![Health badge](/badges/pylesoft-mailbox/health.svg)

```
[![Health](https://phpackages.com/badges/pylesoft-mailbox/health.svg)](https://phpackages.com/packages/pylesoft-mailbox)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
