PHPackages                             spaceemotion/laravel-sparkpost-options - 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. spaceemotion/laravel-sparkpost-options

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

spaceemotion/laravel-sparkpost-options
======================================

Adds support for adding SparkPost options via the X-MSYS-API header, even when using the API implementation

1.1.1(6y ago)61.3k1MITPHPPHP ~5.6|~7.0

Since Jan 21Pushed 6y agoCompare

[ Source](https://github.com/spaceemotion/laravel-sparkpost-options)[ Packagist](https://packagist.org/packages/spaceemotion/laravel-sparkpost-options)[ Docs](https://github.com/spaceemotion/laravel-sparkpost-options)[ RSS](/packages/spaceemotion-laravel-sparkpost-options/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (3)Versions (4)Used By (0)

laravel-sparkpost-options
=========================

[](#laravel-sparkpost-options)

[![Latest Version on Packagist](https://camo.githubusercontent.com/50ba81b518974d6815f195fb9c271aae73a3a54386db311a15476078d30ace00/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370616365656d6f74696f6e2f6c61726176656c2d737061726b706f73742d6f7074696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spaceemotion/laravel-sparkpost-options)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/a9708655b9a7de2ae1aaacc59834fd1db686fd53610b771c08847468698a73e6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370616365656d6f74696f6e2f6c61726176656c2d737061726b706f73742d6f7074696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spaceemotion/laravel-sparkpost-options)

This package adds support for adding SparkPost messaging options. Even though Laravel allows to set global options, this package adds the functionality for per-message options via the X-MSYS-API header, even when using the integrated "send via API" implementation.

**SparkPost Options documentation:**

Install
-------

[](#install)

Via Composer

```
$ composer require spaceemotion/laravel-sparkpost-options
```

**5.4 and below:** Add the ServiceProvider to your `app.php`:

```
Spaceemotion\LaravelSparkPostOptions\SparkPostConfigProvider::class,
```

Usage
-----

[](#usage)

You can either attach the mail header directly:

```
$mailable->withSwiftMessage(function ($message) use ($options) {
    $message->getHeaders()->addTextHeader(SparkPostConfigProvider::CONFIG_HEADER, json_encode([
        // Your options here...
    ]));
});
```

or via the integrated `attach` method:

```
ConfigurableTransport::attach($mailable, [
    // Your options here...
]);
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

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 ~283 days

Total

3

Last Release

2468d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ecbefb008d464a9b6b2bf00c5feae98bc7ca09ccc92feec742ade5ce16956b1b?d=identicon)[spaceemotion](/maintainers/spaceemotion)

---

Top Contributors

[![spaceemotion](https://avatars.githubusercontent.com/u/429147?v=4)](https://github.com/spaceemotion "spaceemotion (4 commits)")[![hossein](https://avatars.githubusercontent.com/u/8146290?v=4)](https://github.com/hossein "hossein (1 commits)")

---

Tags

laravelmailphpsmtpsparkpostlaravelmailersparkpost

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/spaceemotion-laravel-sparkpost-options/health.svg)

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

###  Alternatives

[fedeisas/laravel-mail-css-inliner

Inline the CSS of your HTML emails using Laravel

5974.6M3](/packages/fedeisas-laravel-mail-css-inliner)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[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)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[hafael/azure-mailer-driver

Supercharge your Laravel or Symfony app with Microsoft Azure Communication Services (ACS)! Effortlessly add email, chat, voice, video, and telephony-over-IP for next-level communication. 🚀

14109.2k](/packages/hafael-azure-mailer-driver)

PHPackages © 2026

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