concept7 / laravel-sendinblue
Laravel package for sending transactional emails with Sendinblue using Sendinblue SDK V3 and Symfony
Installs: 6 344
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- illuminate/mail: ^10.0
- illuminate/support: ^10.0
- sendinblue/api-v3-sdk: ^8.3
- spatie/laravel-package-tools: ^1.9.2
- symfony/http-client: ^6.1
- symfony/sendinblue-mailer: ^6.1
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpunit/phpunit: ^9.6
README
laravel-sendinblue
This project is created to simplify sending transactional emails through Sendinblue using Laravel Mailables, Symfony/sendinblue-mailer and Sendinblue API V3 PHP library.
Install using Composer
composer require concept7/laravel-sendinblue
Configuration
Step 1
Ensure that you have the following variables in your project's .env file:
SENDINBLUE_API_KEY=
APP_NAME=
MAIL_FROM_ADDRESS=
Step 2
Add the following maildriver to config/mail.php in the mailers
array.
'sendinblue' => [
'transport' => 'sendinblue',
],
Step 3
Set the MAIL_MAILER
.env variable to:
MAIL_MAILER=sendinblue
Usage
Create a new Mailable using php artisan make:mail
and add the Sendinblue
trait to the Mailable. Next, add ->sendinblue([])
to the Mailable instance and you're done.
use Concept7\LaravelSendinblue\Sendinblue; class MyMailable extends Mailable { use Queueable, SerializesModels, Sendinblue; /** * Build the message */ public function build() { return $this ->to() ->sendinblue([ 'template_id' => 1, 'params' => [ // insert parameters here ] ]); } }
Credits
License
The MIT License (MIT). Please see License File for more information.