pulsesend / pulsesend-laravel
PulseSend for Laravel: a mail transport, a facade and webhook events.
Requires
- php: ^8.2
- illuminate/http: ^11.0 || ^12.0 || ^13.0
- illuminate/support: ^11.0 || ^12.0 || ^13.0
- pulsesend/pulsesend-php: ^0.1
- symfony/mailer: ^7.0 || ^8.0
Requires (Dev)
- orchestra/testbench: ^9.0 || ^10.0 || ^11.0
- pestphp/pest: ^3.0 || ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-11-16 21:26:33 UTC
README
Send your Laravel mail through PulseSend: your Mailables and notifications keep working as they are.
Install
composer require pulsesend/pulsesend-laravel
Requires PHP 8.2 and Laravel 11, 12 or 13.
Configure
PULSESEND_API_KEY=ps_live_xxxxxxxxx
Add a mailer in config/mail.php:
'mailers' => [ // ... 'pulsesend' => [ 'transport' => 'pulsesend', ], ],
Then use it:
MAIL_MAILER=pulsesend MAIL_FROM_ADDRESS=hello@acme.com MAIL_FROM_NAME=Acme
Send
With Laravel's mail, nothing changes:
Mail::to($request->user())->send(new OrderShipped($order));
Or with the PulseSend facade, for everything the API offers (templates, scheduling, batches, tracking):
use PulseSend\Laravel\Facades\PulseSend; PulseSend::emails()->send([ 'from' => 'Acme <hello@acme.com>', 'to' => [$request->user()->email], 'subject' => 'hello world', 'html' => (new OrderShipped($order))->render(), ]);
The transport sends addresses, subject, bodies, attachments (inline images included), your custom headers and the Mailable's tags. The email id comes back in the X-PulseSend-Email-ID header of the sent message. Add a PulseSend-Idempotency-Key header to a message to make retries safe.
Webhooks
The package answers POST /pulsesend/webhook and dispatches a Laravel event per PulseSend event: email.delivered dispatches PulseSend\Laravel\Events\EmailDelivered.
- Add
https://your-app.com/pulsesend/webhookas an endpoint in the PulseSend dashboard. - Copy its signing secret into
.env:
PULSESEND_WEBHOOK_SECRET=...
- Listen:
Event::listen(function (\PulseSend\Laravel\Events\EmailBounced $event) { $event->payload['data']['email_id']; });
The route is registered only once PULSESEND_WEBHOOK_SECRET is set (PULSESEND_ROUTES=false turns it off, true keeps it without a secret). It sits outside the web middleware group, so CSRF doesn't apply.
Without PULSESEND_API_KEY, the app still boots: only an actual send throws ApiKeyIsMissing.
License
MIT