Official SendinBlue provided API V2 Symfony 2.x & 3.x Bundle

Installs: 116 683

Dependents: 1

Suggesters: 0

Stars: 14

Watchers: 5

Forks: 10

Open Issues: 7


v2.0.10 2017-01-04 12:50 UTC


Note: The latest API V3.0 ( LTS ) is now maintained at and the Documentation is available here

This is SendinBlue provided API V2 Symfony Bundle. It implements the various exposed APIs that you can read more about on


This version of the bundle requires Symfony 2.x OR 3.x.


Download SendinBlueApiBundle using composer

Add SendinBlueApiBundle in your composer.json:

        "require": {
            "sendinblue/sendinblue-api-bundle": "2.0.*"

Now tell composer to download the bundle by running the command:

$ composer update


Simply install by running below command

$ composer require "sendinblue/sendinblue-api-bundle"

Composer will install the bundle to your project's vendor/sendinblue directory.

Enable the Bundle

In the kernel app/AppKernel.php:


public function registerBundles()
    $bundles = array(
        // ...
        new SendinBlue\SendinBlueApiBundle\SendinBlueApiBundle(),

Add SendinBlue Api key

In your app/config/config.yml:

    api_key: <Your access key>
    # Our library supports a timeout value, which is an optional parameter, default is 30,000 MS ( 30 secs )
    timeout: 5000


The API is available with the sendinblue_api service. To access it, add in your controller (or elsewhere):

$sendinblue = $this->get('sendinblue_api');


Get your account information

$sendinblue = $this->get('sendinblue_api');

$result = $sendinblue->get_account();
// var_dump($result);

To send email


$sendinblue = $this->get('sendinblue_api');

$data = array( "to" => array(""=>"to whom!"),
    "cc" => array(""=>"cc whom!"),
    "bcc" => array(""=>"bcc whom!"),
    "replyto" => array("","reply to!"),
    "from" => array("","from email!"),
    "subject" => "My subject",
    "text" => "This is the text",
    "html" => "This is the <h1>HTML</h1><br/>
               This is inline image 1.<br/>
               <img src=\"{myinlineimage1.png}\" alt=\"image1\" border=\"0\"><br/>
               Some text<br/>
               This is inline image 2.<br/>
               <img src=\"{myinlineimage2.jpg}\" alt=\"image2\" border=\"0\"><br/>
               Some more text<br/>
               Re-used inline image 1.<br/>
               <img src=\"{myinlineimage1.png}\" alt=\"image3\" border=\"0\">",
    "attachment" => array(),
    "headers" => array("Content-Type"=> "text/html; charset=iso-8859-1","X-param1"=> "value1", "X-param2"=> "value2","X-Mailin-custom"=>"my custom value", "X-Mailin-IP"=> "", "X-Mailin-Tag" => "My tag"),
    "inline_image" => array("myinlineimage1.png" => "your_png_files_base64_encoded_chunk_data","myinlineimage2.jpg" => "your_jpg_files_base64_encoded_chunk_data")

$result = $sendinblue->send_email($data);
// var_dump($result);

Support and Feedback

Be sure to visit the SendinBlue official documentation website for additional information about our API.

If you find a bug, please submit the issue in Github directly.

As always, if you need additional assistance, drop us a note here.