PHPackages                             juanparati/brevosuite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. juanparati/brevosuite

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

juanparati/brevosuite
=====================

Complete Brevo integration with Laravel

12.0.3(7mo ago)1010.8k↓20%4MITPHPPHP &gt;=8.2

Since Feb 29Pushed 7mo ago2 watchersCompare

[ Source](https://github.com/juanparati/BrevoSuite)[ Packagist](https://packagist.org/packages/juanparati/brevosuite)[ RSS](/packages/juanparati-brevosuite/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (7)Versions (14)Used By (0)

Brevo suite for Laravel
=======================

[](#brevo-suite-for-laravel)

What is it?
-----------

[](#what-is-it)

A complete [Brevo](https://www.brevo.com/) suite for Laravel.

It provides the following features

- Laravel native mail transport.
- Transactional template transport.
- Transactional SMS transport.
- Native Brevo services (Contacts, Marketing, Accounts, Sales, etc).

Installation
------------

[](#installation)

For Laravel 12.x

```
  composer require juanparati/brevosuite "^12.0"

```

For Laravel 11.x

```
  composer require juanparati/brevosuite "^11.0"

```

For Laravel 10.x

```
  composer require juanparati/brevosuite "^10.0"

```

For older Laravel versions check [Sendinblue v3 for Laravel](https://github.com/juanparati/Sendinblue).

1. Add the following configuration snippet into the "config/services.php" file

    ```
      'brevo' => [
          'key'   => '[your api key]'
      ],

    ```
2. Change the mail driver to "brevo" into the "config/mail.php" file or the ".env" file (Remember that ".env" values will overwrite the config values). Example:

    ```
      'driver' => env('MAIL_MAILER', 'brevo'),

      'mailers' => [
          // ...
          'brevo' => [
              'transport' => 'brevo'
          ]
          // ...
      ];

    ```

Usage
-----

[](#usage)

### Transactional mail transport

[](#transactional-mail-transport)

Just use the transactional e-mails using the [Laravel Mail facade](https://laravel.com/docs/8.x/mail#sending-mail).

As soon that Brevo was configured as native mail transport you can use the following code in order to test it:

```
// Paste this code inside "artisan tinker" console.
Mail::raw('Test email', function ($mes) {
    $mes->to('[youremail@example.tld]');
    $mes->subject('Test');
});

```

### Transactional mail template transport

[](#transactional-mail-template-transport)

The transactional mail template transport allow to send templates as transactional e-mails using Brevo.

It's possible to register the mail template transport facade into the "config/app.php":

```
    'MailTemplate' => Juanparati\BrevoSuite\Facades\Template::class,

```

Now it's possible to send templates in the following way:

```
    MailTemplate::to('user@example.net');           // Recipient
    MailTemplate::cc('user2@example.net');          // CC
    MailTemplate::bcc('user3@example.net');         // BCC
    MailTemplate::replyTo('boss@example.net');      // ReplyTo
    MailTemplate::attribute('NAME', 'Mr User');     // Replace %NAME% placeholder into the template
    MailTemplate::attach('file.txt');               // Attach file
    MailTemplate::attachURL('http://www.example.com/file.txt'); // Attach file from URL
    MailTemplate::send(100);                        // Send template ID 100 and return message ID in case of success

```

It's possible to reset the template message using the "reset" method:

```
    MailTemplate::to('user@example.net');           // Recipient
    MailTemplate::cc('user5@example.net');          // Second recipient
    MailTemplate::attribute('TYPE', 'Invoice');     // Replace %TYPE% placeholder
    MailTemplate::send(100);                        // Send template

    MailTemplate::to('user2@example.net');          // Another recipient
    MailTemplate::send(100);                        // Send template but attribute "type" and second recipient from previous e-mail is used

    MailTemplate::reset();                          // Reset message

    MailTemplate::to('user3@example.net');
    MailTemplate::send(100);                        // Send template but previous attribute and second recipient is not used.

```

It's also possible enclose the mail message into a closure so the call to the "reset" method is not necessary:

```
    MailTemplate::send(100, function ($message) {
        $message->to('user2@example.net');

        // Note: Your template should contains the placeholder attributes surrounded by "%" symbol.
        // @see: https://help.brevo.com/hc/en-us/articles/360000268730-How-to-customize-your-transactional-emails
        $message->attributes(['placeholder1' => 'one', 'placeholder2' => 'two']);
        ...
    });

```

### Transactional SMS

[](#transactional-sms)

The transactional SMS allow to send SMS using the Brevo SMS transport.

I's possible to register the SMS transport facade into the "config/app.php":

```
    'SMS' => Juanparati\BrevoSuite\Facades\Sms::class,

```

Usage examples:

```
    SMS::sender('TheBoss');         // Sender name (Spaces and symbols are not allowed)
    SMS::to('45123123123');         // Mobile number with internal code (ES)
    SMS::message('Come to work!');  // SMS message
    SMS::tag('lazydev');            // Tag (Optional)
    SMS::webUrl('http://example.com/endpoint'); // Notification webhook (Optional);
    SMS::send();

```

Like the transactional template transport, it is also possible reset the state using the "reset" method or just using a closure:

```
    SMS::send(function($sms) {
        $sms->to('45123123123');
        $sms->sender('Mr Foo');
        $sms->message('Hello Mr Bar');
        ...
    });

```

### Laravel notifications

[](#laravel-notifications)

The following classes are provided as message builder for Laravel notifications:

- TemplateMessage
- SmsMessage

### API Client

[](#api-client)

By default, this library uses the official [GetBrevo PHP library](https://github.com/getbrevo/brevo-php).

In order to interact with the official library it's possible to inject the custom APIs in the following way:

```
    // Obtain APIClient
    $apliClient = app()->make(\Juanparati\BrevoSuite\Client::class);

    // Use the APIClient with the Brevo ContactsAPI
    $contactsApi = $apliClient->getApi('ContactsApi');

    // Retrieve the first 10 folders
    $folders = $contactsApi->getFolders(10, 0);

```

Another example using Sendinblue models:

```
    $apiClient = app()->make(\Juanparati\BrevoSuite\Client::class);
    $contactsApi = $apiClient->getApi('ContactsApi');

    // Use CreateContact model
    $contact = $apiClient->getModel('CreateContact', ['email' => 'test@example.net', 'attributes' => ['TYPE' => 4, 'NOM' => 'test', 'PRENOM' => 'test'], 'listIds' => [22]]);

    try {
        $contactsApi->createContact($contact);
    }
    catch(\Exception $e){
        dd($e->getMessage());
    }

```

See the [GetBrevo PHP library](https://github.com/getbrevo/brevo-php) for more details.

### Supported by

[](#supported-by)

This project was made possible by [Matchbanker.no](https://matchbanker.no/).

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance63

Regular maintenance activity

Popularity34

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~48 days

Recently: every ~54 days

Total

13

Last Release

224d ago

Major Versions

10.0.1 → 11.0.12024-04-22

10.2.1 → 11.x-dev2025-01-09

11.0.3 → 12.0.02025-02-25

PHP version history (2 changes)10.0.1PHP &gt;=8.1

11.0.1PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/4caf72b4d969cfb8cdfbdc1d594c85b51c9316caf76b80aa0f9de7e3736cf59f?d=identicon)[juanparati](/maintainers/juanparati)

---

Top Contributors

[![juanparati](https://avatars.githubusercontent.com/u/835173?v=4)](https://github.com/juanparati "juanparati (11 commits)")[![huygreenhat](https://avatars.githubusercontent.com/u/89112825?v=4)](https://github.com/huygreenhat "huygreenhat (1 commits)")

---

Tags

phplaravelmailemailsmsbrevosendinbluegetbrevo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/juanparati-brevosuite/health.svg)

```
[![Health](https://phpackages.com/badges/juanparati-brevosuite/health.svg)](https://phpackages.com/packages/juanparati-brevosuite)
```

###  Alternatives

[juanparati/sendinblue

A Sendinblue v3 interface provider for Laravel

20269.6k](/packages/juanparati-sendinblue)[railsware/mailtrap-php

The Mailtrap SDK provides methods for all API functions.

56770.5k](/packages/railsware-mailtrap-php)[ferdous/laravel-otp-validate

Laravel package for OTP validation with built-in features like retry and resend mechanism. Built in max retry and max resend blocking. OTP/Security Code can be send over SMS or Email of your choice with user-defined template.

7124.4k](/packages/ferdous-laravel-otp-validate)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
