noburi / send-laravel
Noburi Send 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
- noburi/send-php: ^0.2
- 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
README
Send your Laravel mail through Noburi Send: your Mailables and notifications keep working as they are.
Install
composer require noburi/send-laravel
Requires PHP 8.2 and Laravel 11, 12 or 13.
Configure
NOBURI_SEND_API_KEY=ps_live_xxxxxxxxx
Add a mailer in config/mail.php:
'mailers' => [ // ... 'noburi-send' => [ 'transport' => 'noburi-send', ], ],
Then use it:
MAIL_MAILER=noburi-send 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 Noburi Send facade, for everything the API offers (templates, scheduling, batches, tracking):
use Noburi\Send\Laravel\Facades\NoburiSend; NoburiSend::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 Noburi-Send-Idempotency-Key header to a message to make retries safe.
Webhooks
The package answers POST /noburi-send/webhook and dispatches a Laravel event per Noburi Send event: email.delivered dispatches Noburi\Send\Laravel\Events\EmailDelivered.
- Add
https://your-app.com/noburi-send/webhookas an endpoint in the Noburi Send dashboard. - Copy its signing secret into
.env:
NOBURI_SEND_WEBHOOK_SECRET=...
- Listen:
Event::listen(function (\Noburi\Send\Laravel\Events\EmailBounced $event) { $event->payload['data']['email_id']; });
The route is registered only once NOBURI_SEND_WEBHOOK_SECRET is set (NOBURI_SEND_ROUTES=false turns it off, true keeps it without a secret). It sits outside the web middleware group, so CSRF doesn't apply.
Without NOBURI_SEND_API_KEY, the app still boots: only an actual send throws ApiKeyIsMissing.
License
MIT
Moving from pulsesend/pulsesend-laravel
This package is the same code under its new name. Nothing breaks while you switch:
composer remove pulsesend/pulsesend-laravel && composer require noburi/send-laravel.- Replace
PulseSend\Laravel\withNoburi\Send\Laravel\in your imports, and thePulseSendfacade withNoburiSend. - The
PULSESEND_*variables are still read when theNOBURI_SEND_*ones are missing,MAIL_MAILER=pulsesendstill works, and so does thePulseSend-Idempotency-Keyheader. - The webhook route moves to
/noburi-send/webhook: update the endpoint in the dashboard, or keep the old address withNOBURI_SEND_PATH=pulsesend. - If you published
config/pulsesend.php, publish the new file (php artisan vendor:publish --tag=noburi-send-config) and delete the old one.