io-digital / laravel-sendgrid-driver
SendGrid driver for Laravel's mail configuration
Installs: 13 495
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 7
Forks: 1
Open Issues: 3
Requires
- guzzlehttp/guzzle: ~5.1
- illuminate/mail: ~5.1
Requires (Dev)
- illuminate/container: ~5.1.0
- illuminate/filesystem: ~5.1.0
- phpunit/phpunit: >=4.0
This package is not auto-updated.
Last update: 2021-05-15 00:54:33 UTC
README
A mail driver with support for Sendgrid Web API, using the original Laravel API. This library extends the original Laravel classes, so it uses exactly the same methods.
Using this package requires a Sendgrid API key which may be generated here.
Install
Add the package to your composer.json
and run composer update
:
"require": { "io-digital/laravel-sendgrid-driver": "^1.0" },
Alternatively, install directly with composer:
$ composer require io-digital/laravel-sendgrid-driver
Remove the default service provider and add the sendgrid service provider in app/config/app.php
:
'providers' => [ // Illuminate\Mail\MailServiceProvider::class, IoDigital\SendGridDriver\MailServiceProvider::class, ];
Configure
Edit your .env
file to include the following:
MAIL_DRIVER=sendgrid
SENDGRID_API_KEY='YOUR_SENDGRID_API_KEY'
And finally, edit your config/service.php
file to include the following:
'sendgrid' => [ 'api_key' => env('SENDGRID_API_KEY') ]