You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Maxime Renou 4ab8d76479 feat: php 8 support 8 months ago
config Update 'config/bmail.php' 1 year ago
src OMG 1 year ago
.gitignore Adding Guzzle 2 years ago Fixes 1 year ago
composer.json feat: php 8 support 8 months ago
composer.lock Adding Guzzle 2 years ago


The Bluescale Mail package allows you to send Bluescale Mail templates using Laravel notifications system.


First in your composer.json, add:

"require": {
    "bluescale/laravel-mail": "dev-master"
"repositories": [
        "type": "vcs",
        "url": ""

Next, install the package:

composer update bluescale/laravel-mail

If you want to customize the config system:

php artisan vendor:publish

Finally, copy your API key from Bluescale Mail (Templates section), and add it in your .env:


You may also want to use your own API:



First, create a new notification or use an existing one:

php artisan make:notification MyAwesomeNotification

Add BluescaleMailChannel in the via() method:

return [BluescaleMailChannel::class];

Then, create a 'toTemplate()' method, in which you specify your template fields :

public function toTemplate($notifiable)
    return (new BluescaleMailTemplate("my-template-id"))
        ->sender("", "John OPTIONAL") // OPTIONAL
        ->replyTo("", "Jean OPTIONAL") // OPTIONAL
                "", [
                    "name" => "Elvis" // OPTIONAL,
                    "parameters" => ["key" => "value"] // OPTIONAL
        ->addRecipient("") // OPTIONAL
        ->parameters(["key" => "value", "key" => "value"]) // OPTIONAL
        ->addParameter("key", "value") // OPTIONAL

The $notifiable is automaticaly added as recipient.

In your controller, you can now send your template:

User::first()->notify(new MyAwesomeNotification);