New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

kreatif/laravel-brevo-mailer

Symfony Mailer transport for the Brevo transactional email API, for use with Laravel's Mail facade.
1,021
Install
composer require kreatif/laravel-brevo-mailer
Latest Version:1.2.0
PHP:^8.2|^8.3|^8.4
Laravel:11 · 12 · 13
License:MIT
Last Updated:Sep 4, 2026
Links: GitHub  ·  Packagist
Maintainer: kreatif

Laravel Brevo Mailer

A Symfony Mailer transport for the Brevo transactional email API (POST /v3/smtp/email), for use with Laravel's Mail facade.

Installation

composer require kreatif/laravel-brevo-mailer

Configuration

BREVO_API_KEY=xxxxx
MAIL_MAILER=brevo

In config/mail.php, add a mailer entry:

'brevo' => [
    'transport' => 'brevo',
],

No other code changes are needed — existing Mailable/Notification classes keep working unchanged; they just send through Brevo instead of SMTP.

Bounce/complaint webhook parsing

Brevo reports what happened to a mail after it accepted it (bounces, spam complaints, ...) via a separate webhook call to a URL you configure in Brevo. This package includes Kreatif\BrevoMailer\Webhook\BrevoWebhookEvent to parse that payload into a typed object, since the wire format (event names, the hyphenated message-id field, which events are terminal vs. Brevo-retried) is Brevo API knowledge, not app-specific:

use Kreatif\BrevoMailer\Webhook\BrevoWebhookEvent;

Route::post('brevo-webhook', function (Request $request) {
    foreach (BrevoWebhookEvent::manyFromArray($request->json()->all()) as $event) {
        if (!$event->isValid()) {
            continue;
        }
        // $event->type, $event->email, $event->messageId, $event->reason
        // $event->isHardBounce() / isSoftBounce() / isBlocked() / isInvalidEmail() / isSpamComplaint()
        // $event->isBounce() / $event->isTerminal() (confirmed problem, not a Brevo-retried soft bounce)

        // What to do with it (look up your own send-log record, notify
        // someone, ...) is entirely up to your app.
    }

    return response()->json(['received' => true]);
});

This package does not provide the route, auth middleware, or webhook registration itself (Brevo lets you set a custom Authorization header per webhook via their Create Webhook API/dashboard — use whatever auth scheme fits your app).

Scope

This package only implements the Brevo transport and the bounce/complaint webhook payload parser — i.e. the parts that are genuinely Brevo API knowledge, reusable regardless of app. Queueing, retry policy, delivery logging, and failure notifications are application concerns and are intentionally left to the consuming app (see monni_service's app/Mail/Concerns, app/Listeners/Mail, app/Services/Mail, app/Http/Controllers/Mail/BrevoWebhookController, and EmailLog model for that layer).

Swapping to a different provider later (e.g. Azure Communication Services) means adding a sibling transport and changing MAIL_MAILER, not touching any Mailable.

Related Packages

bhekor/laravel-brevo

Laravel package for Brevo (ex-Sendinblue) API integration

2,646 1
juanparati/brevosuite

Complete Brevo integration with Laravel

19,875 12
vansteen/laravel-sendinblue

A Laravel 5/6/7/8 service provider, facade and config file for the SendinBlue's...

126,845 18
hofmannsven/laravel-brevo

Laravel wrapper for Brevo's API v3 PHP library.

94,108 36
tzk/sendinblue

A Laravel 5 (and Laravel 4) wrapper for the SendInBlue API PHP class (as provide...

4,852 0

Version History

Version Released PHP Laravel License
1.2.0 ^8.2|^8.3|^8.4 ^11.0||^12.0||^13.0 MIT
1.1.0 ^8.2|^8.3|^8.4 ^11.0||^12.0||^13.0 MIT