alex-kudrya / laravel-mailjet
MailJet mailer implementation for Laravel
v1.2.3
2024-06-29 20:45 UTC
Requires
- php: ^8.2
- illuminate/support: ^10|^11.0
- laravel/framework: ^10.0|^11.0
- mailjet/mailjet-apiv3-php: ^1.6
- symfony/mailer: ^6.2|^7.0
- symfony/mime: ^6.4|^7.0
README
Install
composer require alex-kudrya/laravel-mailjet
Add provider to config/app.php
// config/app.php
'providers' => [
...
/*
* Package Service Providers...
*/
\AlexKudrya\LaravelMailjet\Providers\MailJetServiceProvider::class,
...
]
Add variables to .env
MAILJET_API_KEY={Your mailjet api_key}
MAILJET_SECRET={Your mailjet secret_key}
Add mailjet
mailer to mailers
array in config/mail.php
// config/mail.php
'mailers' => [
...
'mailjet' => [
'transport' => 'mailjet',
'api_key' => env('MAILJET_API_KEY'),
'secret_key' => env('MAILJET_SECRET'),
],
...
]
Change primary mailer in .env
MAIL_MAILER=mailjet
Optionally you can change default mailer in config/mail.php
// config/mail.php
'default' => env('MAIL_MAILER', 'mailjet'),
That's all, now you can send your emails!