PHPackages                             silverback/yii2-sendinblue - 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. silverback/yii2-sendinblue

ActiveYii2-extension[Mail &amp; Notifications](/categories/mail)

silverback/yii2-sendinblue
==========================

Sendinblue integration and Mailer for the Yii framework

1.0.1(6y ago)11.9k↓85.7%3[1 issues](https://github.com/silverbackstudio/yii2-sendinblue/issues)MITPHPCI failing

Since Oct 8Pushed 6y ago1 watchersCompare

[ Source](https://github.com/silverbackstudio/yii2-sendinblue)[ Packagist](https://packagist.org/packages/silverback/yii2-sendinblue)[ RSS](/packages/silverback-yii2-sendinblue/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (2)Used By (0)

Yii2 Framework Sendinblue Mailer and Contacts integration
=========================================================

[](#yii2-framework-sendinblue-mailer-and-contacts-integration)

Provide the following classes:

- **[yii/sendinblue/transactional/Mailer](src/transactional/Mailer.php)**: A class that implements [MailerInterface](https://www.yiiframework.com/doc/api/2.0/yii-mail-mailerinterface) and uses [Sendinblue API v3](https://developers.sendinblue.com/v3.0/reference) to send email
- **[yii/sendinblue/transactional/Message](src/transactional/Message.php)**: A class that implements [MessageInterface](https://www.yiiframework.com/doc/api/2.0/yii-mail-messageinterface) for standard emails

The choice between the two message types is made automatically by the `compose()` method.

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

[](#installation)

Install this package in Yii project root with [Composer](https://getcomposer.org/).

`composer require silverback/yii2-sendinblue`

Setup
-----

[](#setup)

Setup the Sendinblue mailer in app config:

```
    'components' => [
        //...

        'mailer' => [
            'class' => 'yii\sendinblue\transactional\Mailer',
            'apikey' => 'your-sedinblue-api-key',
        ],

        //...
    ]
```

Usage
-----

[](#usage)

### Send email using a view (standard Yii behavior)

[](#send-email-using-a-view-standard-yii-behavior)

```
$viewAttributes = array(
    'attribute1' => 'value1',
);

$message = \Yii::$app->mailer->compose('view-name', $viewAttributes);
$message->setFrom( 'noreply@example.com' );
$message->setSubject( 'Subject' );
$message->setTo( 'user@example.com' );

if ( $message->send() ) {
    echo "Sent successfully";
}
```

### Send email with custom text

[](#send-email-with-custom-text)

```
$message = \Yii::$app->mailer->compose();
$message->setFrom( 'noreply@example.com' );
$message->setSubject( 'Subject' );
$message->setTo( 'user@example.com' );
$message->setTextBody( 'test content' );

if ( $message->send() ) {
    echo "Sent successfully";
}
```

### Send email with Sendinblue template

[](#send-email-with-sendinblue-template)

```
$template_id = 1;

$templateAttributes = array(
    'attr1' => 'value1',
    'attr2' => array(
        'subattr1' => 'value2',
        'subattr2' => array(
            'subsubattr1' => 'value2',
        )
    ),
);

// The class uses Sendiblue templates when the view name is an integer instead of string.

$message = \Yii::$app->mailer->compose( $template_id, $templateAttributes );
$message->setTo( 'user@example.com' );

if ( $message->send() ) {
    echo "Sent successfully";
}
```

The following attributes will be available as replacements in the template:

```
%ATTR1%
%ATTR2__SUBATTR1%
%ATTR2__SUBATTR2__SUBSUBATTR1%

```

All attributes will be converted and must be used in uppercase.

Testing
-------

[](#testing)

This class uses [PHPUnit](https://phpunit.de/) as test suite, to test the classes and functions follow this steps.

Copy the file `phpunit.xml.dist` in `phpunit.xml` in the library folder and define Api-Key and addresses inside it:

```

        ...

```

Launch a `composer update` to install all the dependencies and test suite.

Run the test with the following commands

```
./vendor/bin/phpunit  tests/  # all tests
./vendor/bin/phpunit  tests/TemplateMessageTest # single test
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

2457d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a82a47436ceac89bbaeb95a8367354273e56082b8bbbaa8c50ababaf6032d77?d=identicon)[brandomeniconi](/maintainers/brandomeniconi)

---

Tags

emailmaileryii2sendinblue

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/silverback-yii2-sendinblue/health.svg)

```
[![Health](https://phpackages.com/badges/silverback-yii2-sendinblue/health.svg)](https://phpackages.com/packages/silverback-yii2-sendinblue)
```

###  Alternatives

[nickcv/yii2-mandrill

Mandrill Api Integration for Yii2

29570.2k2](/packages/nickcv-yii2-mandrill)[boundstate/yii2-mailgun

Mailgun integration for the Yii framework

28165.8k](/packages/boundstate-yii2-mailgun)[yarcode/yii2-mailgun-mailer

Mailgun mailer implementation for Yii2

1576.5k](/packages/yarcode-yii2-mailgun-mailer)[djagya/yii2-sparkpost

A library provides Yii2 integration with SparkPost mail service

1816.4k](/packages/djagya-yii2-sparkpost)

PHPackages © 2026

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