artisan-build / sink-client
The capture transport side of Sink. Installed in Laravel apps whose outbound mail should be captured by a Sink server.
Requires
- php: ^8.3
- artisan-build/bfc-client: ^0.1
- artisan-build/built-for-cloud: ^0.3
- artisan-build/sink-contracts: ^1.0
- illuminate/contracts: ^11.0 || ^12.0 || ^13.0
- illuminate/http: ^11.0 || ^12.0 || ^13.0
- illuminate/support: ^11.0 || ^12.0 || ^13.0
- laravel/prompts: ^0.1 || ^0.2 || ^0.3
- symfony/mailer: ^7.0 || ^8.0
- symfony/mime: ^7.0 || ^8.0
Requires (Dev)
- laravel/pint: ^1.27
- orchestra/testbench: ^9.0 || ^10.0 || ^11.0
- pestphp/pest: ^4.0
README
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.
Installation
composer require artisan-build/sink-client
Then configure the Sink server URL and token:
php artisan sink:install --url=https://sink.example.test --token=your-token
Enable capture explicitly in the host app:
MAIL_MAILER=sink SINK_URL=https://sink.example.test SINK_TOKEN=your-token
Installing the package alone does not change your default mailer. Sink only captures mail when the
application selects MAIL_MAILER=sink.
Configuration
Publish the config if you need to tune retries, timeout, stream tagging, or message size limits:
php artisan vendor:publish --tag=sink-client-config
Available 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.
Production Fuse
Sink refuses to construct the transport in production unless you explicitly set:
SINK_ALLOW_PRODUCTION=true
This 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.
Compatibility
Check server/client envelope compatibility with:
php artisan sink:update
If your Sink server does not expose /capabilities yet, the command reports that gracefully.
License
MIT. See LICENSE.