Skip to content

Commit

Permalink
Update mail.md
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Feb 3, 2022
1 parent 9886f81 commit 16d5829
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions mail.md
Original file line number Diff line number Diff line change
Expand Up @@ -887,32 +887,30 @@ composer require symfony/sendinblue-mailer
```

Add your Sendinblue API key to your `config/services.php`:
```
'sendinblue' => [
'api' => 'Your API key',
],
```

'sendinblue' => [
'api' => 'Your API key',
],

Extend the Laravel `MailManager` with the Sendinblue Mail Tranport:
```
use Illuminate\Mail\MailManager;
use Symfony\Component\Mailer\Bridge\Sendinblue\Transport\SendinblueTransportFactory;
use Symfony\Component\Mailer\Transport\Dsn;
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
$this->app[MailManager::class]->extend('sendinblue', function () {
return (new SendinblueTransportFactory())->create(
new Dsn('sendinblue+api', 'default', $this->app['config']->get('services.sendinblue.api'))
);
});
}
```

use Illuminate\Mail\MailManager;
use Symfony\Component\Mailer\Bridge\Sendinblue\Transport\SendinblueTransportFactory;
use Symfony\Component\Mailer\Transport\Dsn;

/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
$this->app[MailManager::class]->extend('sendinblue', function () {
return (new SendinblueTransportFactory())->create(
new Dsn('sendinblue+api', 'default', $this->app['config']->get('services.sendinblue.api'))
);
});
}

### Custom mail transport

Expand Down

0 comments on commit 16d5829

Please sign in to comment.