finds.dev

beyondcode/laravel-mailbox

Catch incoming emails in your Laravel application

View on GitHubHomepage ↗

★ 1,135PHPMITupdated Mar 2026

// the take

A Laravel package for receiving inbound email inside your app via webhook-based drivers (Mailgun, Postmark, SendGrid, MailCare) rather than polling an IMAP mailbox. It's for Laravel apps that need to parse replies, support tickets, or forwarded mail without running a separate mail server. Routing closures mirror Laravel's own router, including regex captures on the recipient address.

The `Mailbox::from()` API reuses Laravel's router/middleware mental model, including parameter extraction from the address (`{username}@gmail.com`), which is a nice touch for multi-tenant inbound routing. Supporting four separate inbound webhook providers behind one `DriverInterface` means you're not locked into Mailgun specifically. MIME parsing is delegated to `zbateson/mail-mime-parser` instead of a hand-rolled parser, which is the right call for handling multipart/attachment edge cases correctly.

Test coverage only exists for the `Log` driver — there's no test for the Mailgun, Postmark, SendGrid, or MailCare controllers/requests, which is exactly the code that parses untrusted external payloads and matters most for correctness and security. Webhook authenticity relies on each provider's own request validation plus a basic-auth middleware option, which is weaker than signature verification if you're not careful configuring it per provider. There's a `CleanEmails` console command, implying the package persists inbound emails to your DB indefinitely by default and leaves storage growth/retention as your problem to schedule and tune. You're also fundamentally coupled to whichever provider's inbound-webhook format and reliability you pick — switching providers later means re-verifying parsing behavior, not just swapping a config key.

We read the README, the directory tree and a key source file in November 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,135
Forks
128
Language
PHP
License
MIT
Last commit
20 Mar 2026

// nearby

If laravel-mailbox isn't quite it.

All repos →