New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

frontier-sh/sinkhole-laravel

Laravel mail transport for Sinkhole — a Cloudflare Worker email trap
2,805
Install
composer require frontier-sh/sinkhole-laravel
Latest Version:v1.1.0
PHP:^8.1
Laravel:10 – 13
License:MIT
Last Updated:Oct 23, 2026
Links: GitHub  ·  Packagist
Maintainer: frontier-sh

Sinkhole for Laravel

A Laravel mail transport that sends all outgoing email to a Sinkhole instance — a Cloudflare Worker email trap with a web UI.

Use it in staging or local development to capture emails without delivering them to real inboxes.

Requirements

  • PHP 8.1+
  • Laravel 10, 11, 12, or 13

Installation

composer require frontier-sh/sinkhole-laravel

The service provider is auto-registered via Laravel's package discovery.

Configuration

Add the transport to config/mail.php:

'mailers' => [
    // ...

    'sinkhole' => [
        'transport' => 'sinkhole',
        'endpoint'  => env('SINKHOLE_ENDPOINT'),
        'api_key'   => env('SINKHOLE_API_KEY'),
        'channel'   => env('SINKHOLE_CHANNEL', 'default'),
    ],
],

Set your environment variables:

MAIL_MAILER=sinkhole
SINKHOLE_ENDPOINT=https://your-worker.workers.dev
SINKHOLE_API_KEY=your-api-key
SINKHOLE_CHANNEL=staging
Variable Description
SINKHOLE_ENDPOINT The URL of your Sinkhole Worker
SINKHOLE_API_KEY An API key created from the Sinkhole web UI
SINKHOLE_CHANNEL Optional label to group emails (defaults to default)

What gets captured

  • To, From, Subject
  • HTML and plain text bodies
  • All email headers
  • Attachments (base64-encoded, stored in R2)
  • Custom headers like X-Tag and X-Metadata-* are displayed in the Sinkhole UI

License

MIT

Related Packages

emailit/emailit-laravel

Laravel integration for the Emailit Email API

7,771 4
clinically-au/laravel-smtp2go

Laravel Mail transport driver for SMTP2Go API

17,931 0
redberry/mailbox-for-laravel

Capture outgoing Laravel mail in a local dashboard and assert against the fully...

45,558 126
maize-tech/laravel-msgraph-mailer

Laravel mail transport driver for sending emails via Microsoft Graph API with OA...

2,035 15
tkeer/mailbase

Catch laravel emails for local development

25,749 104

Version History

Version Released PHP Laravel License
v1.1.0 ^8.1 ^10.0|^11.0|^12.0|^13.0 MIT
v1.0.0 ^8.1 ^10.0|^11.0|^12.0 MIT