PHPackages                             tlamedia/sparkpost-bundle - 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. tlamedia/sparkpost-bundle

ActiveSymfony-bundle[Mail &amp; Notifications](/categories/mail)

tlamedia/sparkpost-bundle
=========================

The SparkPostBundle integrates the SparkPost PHP library with Symfony, allowing you to interact with the Sparkpost API in your Symfony projects.

1.2.1(3y ago)314.0kMITPHPPHP ^7.1 || ^8.0

Since Feb 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/tlamedia/SparkPostBundle)[ Packagist](https://packagist.org/packages/tlamedia/sparkpost-bundle)[ Docs](https://github.com/tlamedia)[ RSS](/packages/tlamedia-sparkpost-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (6)Dependencies (7)Versions (7)Used By (0)

SparkPostBundle
===============

[](#sparkpostbundle)

The `SparkPostBundle` integrates the [SparkPost](https://github.com/SparkPost/php-sparkpost) PHP library with Symfony.

[![Latest Stable Version](https://camo.githubusercontent.com/8be9ae970fbdbc3ff93b98f22f3baff08eec9d9f0df693c0dece99ed78c6deba/68747470733a2f2f706f7365722e707567782e6f72672f746c616d656469612f737061726b706f73742d62756e646c652f762f737461626c65)](https://packagist.org/packages/tlamedia/sparkpost-bundle)[![Build Status](https://camo.githubusercontent.com/311a4bf7faaaf4d7d0ff9ac9dc4a86a4f96a2c77692d570cd09b4fd5a8988c32/68747470733a2f2f6170692e7472617669732d63692e6f72672f746c616d656469612f537061726b506f737442756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tlamedia/SparkPostBundle)[![License](https://camo.githubusercontent.com/573bd296cea0740f8b1c147d08eb8161525dd93bcaf98b0e401be89ac417f2f1/68747470733a2f2f706f7365722e707567782e6f72672f746c616d656469612f737061726b706f73742d62756e646c652f6c6963656e7365)](https://packagist.org/packages/tlamedia/sparkpost-bundle)

Installation
------------

[](#installation)

Get the bundlle:

`composer require tlamedia/sparkpost-bundle`

Then enable it in your kernel:

```
// config/bundles.php
return [
    //...
    Tla\SparkPostBundle\TlaSparkPostBundle::class => ['all' => true],
    //...
];
```

Configuration
-------------

[](#configuration)

Configure the API key to use:

```
# config/packages/tla_spark_post.yml
tla_spark_post:
    api_key: 'YOUR_API_KEY' # Replace with your own
```

Usage
-----

[](#usage)

The bundle registers the service `tla_spark_post.api_client`, which allows you to use the SparkPost API.

### Send a mail from a controller

[](#send-a-mail-from-a-controller)

```
class SomeController extends Controller
{
    public function sendAction()
    {

        $sparky = $this->getContainer()->get('tla_spark_post.api_client');

        $promise = $sparky->transmissions->post([

            'content' => [
                'from' => [
                    'name' => 'YOUR_NAME',
                    'email' => 'YOUR_EMAIL',
                ],
                'subject' => 'My first mail using SparkPostBundle',
                'html' => 'Congratulations, {{name}}!You just sent your first mail!',
                'text' => 'Congratulations, {{name}}!! You just sent your first mail!',

            ],
            'substitution_data' => ['name' => 'YOUR_FIRST_NAME'],
            'recipients' => [
                [
                    'address' => [
                        'name' => 'YOUR_NAME',
                        'email' => 'YOUR_EMAIL',
                    ],
                ],
            ],
            'cc' => [
                [
                    'address' => [
                        'name' => 'ANOTHER_NAME',
                        'email' => 'ANOTHER_EMAIL',
                    ],
                ],
            ],
            'bcc' => [
                [
                    'address' => [
                        'name' => 'AND_ANOTHER_NAME',
                        'email' => 'AND_ANOTHER_EMAIL',
                    ],
                ],
            ],
        ]);

        $promise = $sparky->transmissions->get();

        try {
            $promise->wait();
        } catch (\Throwable $t) {
            echo $t->getCode()."\n";
            echo $t->getMessage()."\n";
        }

    }
}
```

Documentation
-------------

[](#documentation)

Detailed documentation on how to access each API method can be found in the documentation of the package that this bundle integrates: [Sparkpost API library](https://github.com/SparkPost/php-sparkpost/blob/master/README.md)

License
-------

[](#license)

This package is available under the [MIT license](LICENSE).

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~365 days

Recently: every ~410 days

Total

6

Last Release

1188d ago

Major Versions

0.1.0 → 1.0.02018-08-12

PHP version history (3 changes)0.1.0PHP ^7.0

1.2.0PHP ^7.1

1.2.1PHP ^7.1 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f4ceaf6571f8d41950c87969bbe302ae8f7a417b0545eb8a04d2d3027e4090d?d=identicon)[tlamedia](/maintainers/tlamedia)

---

Top Contributors

[![TorbenLundsgaard](https://avatars.githubusercontent.com/u/15211444?v=4)](https://github.com/TorbenLundsgaard "TorbenLundsgaard (26 commits)")

---

Tags

symfonybundlesparkpost

### Embed Badge

![Health badge](/badges/tlamedia-sparkpost-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tlamedia-sparkpost-bundle/health.svg)](https://phpackages.com/packages/tlamedia-sparkpost-bundle)
```

###  Alternatives

[pentatrion/vite-bundle

Vite integration for your Symfony app

2725.3M13](/packages/pentatrion-vite-bundle)[sensiolabs/gotenberg-bundle

A Symfony bundle that provides seamless integration with Gotenberg for generating PDFs and screenshots from various sources (HTML, Markdown, Office documents, URLs) with a clean, builder-based API.

210210.4k2](/packages/sensiolabs-gotenberg-bundle)[php-flasher/flasher-symfony

Integrate flash notifications into Symfony projects effortlessly with PHPFlasher. Improve user experience and application feedback loops easily.

141.3M20](/packages/php-flasher-flasher-symfony)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)[cmsig/seal-symfony-bundle

An integration of CMS-IG SEAL search abstraction into Symfony Framework.

15195.8k5](/packages/cmsig-seal-symfony-bundle)

PHPackages © 2026

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