PHPackages                             dyanakiev/laravel-sparkpost-driver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. dyanakiev/laravel-sparkpost-driver

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

dyanakiev/laravel-sparkpost-driver
==================================

SparkPost driver to use with Laravel 6.x|7.x|8.x

10.0.2(3y ago)013MITPHPPHP ^8.0.2

Since Sep 4Pushed 3y agoCompare

[ Source](https://github.com/dyanakiev/laravel-sparkpost-driver)[ Packagist](https://packagist.org/packages/dyanakiev/laravel-sparkpost-driver)[ Docs](https://github.com/vemcogroup/laravel-sparkpost-driver)[ RSS](/packages/dyanakiev-laravel-sparkpost-driver/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (19)Used By (0)

Laravel SparkPost Driver
========================

[](#laravel-sparkpost-driver)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4560d000952d7540c6c7ebbb3aece9ce6998375061cf56340b039b5df444f535/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76656d636f67726f75702f6c61726176656c2d737061726b706f73742d6472697665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vemcogroup/laravel-sparkpost-driver)[![Total Downloads](https://camo.githubusercontent.com/bd2b6e60759eda22b42e3ccc8e707c8ebfc4b74ca25725c5462f508417b7a08e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76656d636f67726f75702f6c61726176656c2d737061726b706f73742d6472697665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vemcogroup/laravel-sparkpost-driver)

Description
-----------

[](#description)

This package allows you to still use SparkPost as MailDriver in Laravel.

This package is inspired by:  and updated with driver from Laravel 5.8.x

Version
-------

[](#version)

Find the correct version to use in the table below:

Laravel versionVersion6.x2.x7.x3.x8.x4.x9.x5.xInstallation
------------

[](#installation)

You can install the package via composer:

```
composer require vemcogroup/laravel-sparkpost-driver
```

The package will automatically register its service provider.

Usage
-----

[](#usage)

**Sparkpost API options**

You can define specific \[SparkPost options\] () 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](http://docs.guzzlephp.org/en/stable/request-options.html) in the SparkPost config section `guzzle`.

Just add the sparkpost service to your `config/services.php`.

```
'sparkpost' => [
    'secret' => env('SPARKPOST_SECRET'),

    // optional guzzle specific configuration
    'guzzle' => [
        'verify' => true,
        'decode_content' => true,
        ...
    ],
    'options' => [
        // configure endpoint, if not default
        'endpoint' => env('SPARKPOST_ENDPOINT'),

        // optional Sparkpost API options go here
        'return_path' => 'mail@bounces.domain.com',
        'options' => [
            '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
```

**Laravel 7**

If you are using a clean Laravel 7.x installation its important you add the following sparkpost config in `config/mail.php` mailer section.

```
'mailers' => [
    ...
    'sparkpost' => [
        'transport' => 'sparkpost'
    ],
    ...
],
```

And replace the `MAIL_DRIVER` from .env with `MAIL_MAILER`, make sure to keep the sparkpost config on `config/services.php`.

Helper functions
----------------

[](#helper-functions)

### Delete supressions

[](#delete-supressions)

```
sparkpost_delete_supression('test@example.com');
```

### Validate single email address

[](#validate-single-email-address)

```
sparkpost_check_email('test@example.com');
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~81 days

Recently: every ~117 days

Total

17

Last Release

1134d ago

Major Versions

1.1.0 → 2.0.02019-12-17

2.0.1 → 3.0.02020-03-03

3.0.2 → 4.0.02020-09-09

4.0.4 → 5.0.02021-12-22

5.0.1 → 10.0.02022-01-24

PHP version history (4 changes)1.0.0PHP ^7.2

4.0.1PHP ^7.3

4.0.3PHP ^7.3|^8.0

5.0.1PHP ^8.0.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c4e9d40209ae6425100552bde050e902cd8b17bde040f686e77b3e380047e04?d=identicon)[dyanakiev](/maintainers/dyanakiev)

---

Top Contributors

[![makije](https://avatars.githubusercontent.com/u/1318142?v=4)](https://github.com/makije "makije (5 commits)")[![acurrieclark](https://avatars.githubusercontent.com/u/1306728?v=4)](https://github.com/acurrieclark "acurrieclark (4 commits)")[![markovic-nikola](https://avatars.githubusercontent.com/u/16388545?v=4)](https://github.com/markovic-nikola "markovic-nikola (3 commits)")[![dyanakiev](https://avatars.githubusercontent.com/u/11967079?v=4)](https://github.com/dyanakiev "dyanakiev (3 commits)")[![g0shed](https://avatars.githubusercontent.com/u/4745874?v=4)](https://github.com/g0shed "g0shed (2 commits)")[![danijelk](https://avatars.githubusercontent.com/u/580753?v=4)](https://github.com/danijelk "danijelk (2 commits)")[![andreasnij](https://avatars.githubusercontent.com/u/1712334?v=4)](https://github.com/andreasnij "andreasnij (1 commits)")[![eldor](https://avatars.githubusercontent.com/u/283184?v=4)](https://github.com/eldor "eldor (1 commits)")[![danielboendergaard](https://avatars.githubusercontent.com/u/314877?v=4)](https://github.com/danielboendergaard "danielboendergaard (1 commits)")

---

Tags

laravelmailsparkpost

### Embed Badge

![Health badge](/badges/dyanakiev-laravel-sparkpost-driver/health.svg)

```
[![Health](https://phpackages.com/badges/dyanakiev-laravel-sparkpost-driver/health.svg)](https://phpackages.com/packages/dyanakiev-laravel-sparkpost-driver)
```

###  Alternatives

[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
