Download the PHP package agirem/clario-laravel without Composer
On this page you can find all versions of the php package agirem/clario-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package clario-laravel
agirem/clario-laravel
Laravel Mail transport and optional webhook consumer for the Clario email API.
Send with familiar Laravel Mailables:
Requirements
- PHP 8.2+
- Laravel 11 or 12
- Clario API access (active trial, Solo, or Pro)
- API key with
emails:send
Installation
Publish config (optional):
Configuration
.env:
config/mail.php:
Sender resolution
The transport sends either mail_address_id or from to the Clario API, in this order:
- Message header
X-Clario-Mail-Address-Id→mail_address_id - Map
config('clario.mail_addresses')[from@email]→mail_address_id - Default
CLARIO_MAIL_ADDRESS_ID→mail_address_id - Laravel / Symfony
Fromaddress →from(API resolves the mailbox)
Display name is configured on the Clario address, not via Laravel from.name.
Idempotency (important for queued mail)
Every send includes an Idempotency-Key. Prefer a stable business key on critical mailables:
If omitted, the transport hashes the rendered message (stable across worker retries of the same content).
Attachments
Attachments are sent as multipart/form-data. Limits match the API: max 10 files, 5 MB each, allowed MIME types (PDF, JPEG/PNG/GIF, Word, Excel, CSV, plain text).
Webhooks (optional)
Point your Clario Developer webhook to https://your-app.test/clario/webhook.
Events dispatched:
Clario\Laravel\Webhooks\Events\EmailQueuedEmailSent,EmailDelivered,EmailBounced,EmailFailedEmailComplained,EmailOpened,EmailClicked,EmailReceived
Signatures use Clario-Signature: t=…,v1=… (HMAC-SHA256 of timestamp.rawBody). Invalid signatures return 401.
The route uses the api middleware group (no CSRF).
Metadata
Exceptions
Clario\Laravel\Exceptions\ClarioTransportException exposes:
statusCode,errorCode,requestIdretryable— useful for queue$this->release()vs fail
Non-retryable examples: pro_plan_required, sender_not_allowed, quota exceeded, idempotency_conflict.
Testing
License
MIT
All versions of clario-laravel with dependencies
illuminate/http Version ^11.0|^12.0
illuminate/mail Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
symfony/mailer Version ^7.0
symfony/mime Version ^7.0