Package Data | |
---|---|
Maintainer Username: | Lidbetter |
Package Create Date: | 2016-04-28 |
Package Last Update: | 2021-05-20 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-08 03:13:36 |
Package Statistics | |
---|---|
Total Downloads: | 28,994 |
Monthly Downloads: | 146 |
Daily Downloads: | 1 |
Total Stars: | 11 |
Total Watchers: | 4 |
Total Forks: | 7 |
Total Open Issues: | 1 |
Require this package with composer using the following command:
composer require clarification/sendgrid-laravel-driver
After updating composer, add the service provider to the providers
array in config/app.php
Clarification\MailDrivers\Sendgrid\SendgridServiceProvider::class,
You will also need to add the sendgrid API Key settings to the array in config/services.php
and set up the environment key
'sendgrid' => [
'api_key' => env('SENDGRID_API_KEY'),
],
SENDGRID_API_KEY=__Your_key_here__
Finally you need to set your mail driver to sendgrid
. You can do this by changing the driver in config/mail.php
'driver' => env('MAIL_DRIVER', 'sendgrid'),
Or by setting the environment variable MAIL_DRIVER
in your .env file
MAIL_DRIVER=sendgrid
If you need to pass any options to the guzzle client instance which is making the request to the Send Grid API, you can do so by setting the 'guzzle' options in config/services.php
'sendgrid' => [
'api_key' => env('SENDGRID_API_KEY'),
'guzzle' => [
'verify' => true,
'decode_content' => true,
]
],