combindma/laravel-sendinblue

This package is abandoned and no longer maintained. No replacement package was suggested.

Manage newsletters in Laravel with Sendinblue

1.1.0 2023-03-18 14:59 UTC

This package is auto-updated.

Last update: 2024-02-26 16:00:40 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Manage newsletters in Laravel with Sendinblue

Installation

You can install the package via composer:

composer require combindma/laravel-sendinblue

You can publish the config file with:

php artisan vendor:publish --tag="sendinblue-config"

This is the contents of the published config file:

return [
    /*
   * Enable or disable Sendinblue. Useful for local development when running tests.
   */
    'api_enabled' => env('SENDINBLUE_ENABLED', false),

    /*
     * The API key of a Sendinblue account.
     */
    'apiKey' => env('SENDINBLUE_APIKEY'),

    /*
     * The default Ids of the lists to add the contact to when no listIds has been specified in a method.
     */
    'defaultListIds' => [
        2,
    ]
];

Usage

Subscribing an email address can be done like this:

Sendinblue::subscribe('email@email.com');

You can pass some merge variables as the second argument:

Sendinblue::subscribe('email@email.com', ['FNAME'=>'Rince', 'LNAME'=>'Wind'];

You can subscribe someone to a specific list ID by using the third argument:

Sendinblue::subscribe('email@email.com', ['FNAME'=>'Rince', 'LNAME'=>'Wind'], [2]);

Unsubscribing an email address can be done like this:

Sendinblue::unsubscribe('email@email.com');

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.