mehedimi / laravel-sendgrid
A package for using sendgrid as an email sending driver for Laravel
1.0.0
2021-09-16 15:36 UTC
Requires
- php: ^7.3|^8.0
- guzzlehttp/guzzle: ^7.3
- illuminate/mail: ^7|^8
Requires (Dev)
- illuminate/config: ^8.60
- mockery/mockery: ^1.4
- phpunit/phpunit: ^9.5
- symfony/var-dumper: ^5.3
README
SendGrid mailer for Laravel Framework
Installation
composer require mehedimi/laravel-sendgrid
Configure
First you need to add the sendgrid api config services.php
file
'sendgrid' => [
'api_key' => env('SENDGRID_API_KEY')
]
Next you need to add the sendgrid mailable config into mail.php
file on mailers
array
'sendgrid' => [
'transport' => 'sendgrid',
'options' => [
// optional sendgrid `/mail/send` endpoints value (if you need)
]
],
Third step you need to add SENDGRID_API_KEY
environment variable on the .env
file and set value of MAIL_MAILER
to sendgrid