| Package Data | |
|---|---|
| Maintainer Username: | vemcogroup |
| Package Create Date: | 2019-09-04 |
| Package Last Update: | 2025-02-17 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-28 03:03:15 |
| Package Statistics | |
|---|---|
| Total Downloads: | 1,500,758 |
| Monthly Downloads: | 25,259 |
| Daily Downloads: | 1,053 |
| Total Stars: | 41 |
| Total Watchers: | 5 |
| Total Forks: | 15 |
| Total Open Issues: | 2 |
This package allows you to still use SparkPost as MailDriver in Laravel 6.x
This package is inspired by: https://github.com/clarification/sparkpost-laravel-driver and updated with driver from Laravel 5.8.x
You can install the package via composer:
composer require vemcogroup/laravel-sparkpost-driver
The package will automatically register its service provider.
Sparkpost API options
You can define specific [SparkPost options]
(https://developers.sparkpost.com/api/transmissions/#header-request-body) like open_tracking, click_tracking, transactional
EU GDPR
You are able to use the EU endpoint for Europe GDPR compliance by setting the endpoint option or the default will be used.
SparkPost (default): https://api.sparkpost.com/api/v1
SparkPost EU: https://api.eu.sparkpost.com/api/v1
Guzzle options
You are able to specify Guzzle options in the SparkPost config section guzzle.
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
'guzzle' => [
'verify' => true,
'decode_content' => true,
...
],
'options' => [
'endpoint' => env('SPARKPOST_ENDPOINT'),
'open_tracking' => false,
'click_tracking' => false,
'transactional' => true,
],
],
API Key
You will also need to add the SparkPost API Key to your environment file
SPARKPOST_SECRET=__Your_key_here__
Finally you need to set your mail driver to SparkPost. You can do this by changing the driver in config/mail.php
'driver' => env('MAIL_DRIVER', 'sparkpost'),
Or by setting the environment variable MAIL_DRIVER in your .env file
MAIL_DRIVER=sparkpost