Read-only mirror. This repository is a read-only split of the
artisan-build/sinkmonorepo. Issues and pull requests are disabled here — please open them on the monorepo.
The send side of Sink. It provides the Laravel sink mail transport that captures outbound
messages and posts them to a self-hosted Sink server instead of delivering them anywhere.
composer require artisan-build/sink-clientThen configure the Sink server URL and token:
php artisan sink:install --url=https://sink.example.test --token=your-tokenEnable capture explicitly in the host app:
MAIL_MAILER=sink
SINK_URL=https://sink.example.test
SINK_TOKEN=your-tokenInstalling the package alone does not change your default mailer. Sink only captures mail when the
application selects MAIL_MAILER=sink.
Publish the config if you need to tune retries, timeout, stream tagging, or message size limits:
php artisan vendor:publish --tag=sink-client-configAvailable environment values:
SINK_URL: Sink server base URL.SINK_TOKEN: Sink ingest token.SINK_STREAM: optional stream label for future per-run isolation.SINK_RETRY_ATTEMPTS: HTTP attempts before the send fails visibly. Default3.SINK_RETRY_BASE_MS: exponential backoff base in milliseconds. Default200.SINK_TIMEOUT: per-attempt HTTP timeout in seconds. Default15.SINK_MAX_MESSAGE_BYTES: raw MIME size ceiling before attachments are dropped or headers-only capture is used. Default10485760.
Sink refuses to construct the transport in production unless you explicitly set:
SINK_ALLOW_PRODUCTION=trueThis prevents production mail from being silently swallowed. If Sink cannot capture a selected message after retries are exhausted, the send throws so queued mail jobs fail visibly.
Check server/client envelope compatibility with:
php artisan sink:updateIf your Sink server does not expose /capabilities yet, the command reports that gracefully.
MIT. See LICENSE.