drixs6o9/sendinblue-mailer

Symfony Sendinblue Mailer Bridge


Keywords
mailer, symfony, Bridge, sendinblue, sendinblue-mailer, symfony-mailer
License
MIT

Documentation

Sendinblue Mailer

This package is abandoned and no longer maintained. I suggests using the symfony/sendinblue-mailer package instead.

Provides Sendinblue integration for Symfony Mailer.

CI Codacy Badge

Installation

Open a command console inyour project directory and execute the following command to download the latest stable version of this bundle:

$ composer require drixs6o9/sendinblue-mailer

Then, enable the bundle by adding the following line in the config/bundle.php file of your project:

<?php
// config/bundle.php

return [
    // ...
    Drixs6o9\SendinblueMailerBundle\SendinblueMailerBundle::class => ['all' => true],
];

Finally, add your Sendinblue credentials into your .env.local file of your project following the sending method wanted :

SMTP:

Your MAILER_DSN can be configured as SMTP with sendinblue or sendinblue+smtp key, or be configured as STMPS with sendinblue+smtps key.

Exemple:

###> drixs6o9/sendinblue-mailer ###
SENDINBLUE_USERNAME=username
SENDINBLUE_PASSWORD=password
MAILER_DSN=sendinblue+smtps://$SENDINBLUE_USERNAME:$SENDINBLUE_PASSWORD@default
###< drixs6o9/sendinblue-mailer ###

HTTP API:

You can use HTTP API transport by configuring your DSN as this:

###> drixs6o9/sendinblue-mailer ###
SENDINBLUE_API_KEY=your-api-key
MAILER_DSN=sendinblue+api://$SENDINBLUE_API_KEY@default
###< drixs6o9/sendinblue-mailer ###

With HTTP API, you can use custom headers.

$params = ['param1' => 'foo', 'param2' => 'bar'];
$json = json_encode(['"custom_header_1' => 'custom_value_1']);

$email = new Email();
$email
    ->getHeaders()
    ->add(new MetadataHeader('custom', $json))
    ->add(new TagHeader('TagInHeaders1'))
    ->add(new TagHeader('TagInHeaders2'))
    ->addTextHeader('sender.ip', '1.2.3.4')
    ->addTextHeader('templateId', 1)
    ->addParameterizedHeader('params', 'params', $params)
    ->addTextHeader('foo', 'bar')
;

This example allow you to set :

  • templateId
  • params
  • tags
  • headers
    • sender.ip
    • X-Mailin-Custom

For more informations, you can refer to Sendinblue API documentation.

Resources

Contributors