PHPackages                             mpp/message-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. [Templating &amp; Views](/categories/templating)
4. /
5. mpp/message-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

mpp/message-bundle
==================

Symfony Message Bundle

v4.0.0(7mo ago)012.1k↓51.3%MITPHPPHP ^8.1

Since Nov 6Pushed 7mo ago3 watchersCompare

[ Source](https://github.com/mon-petit-placement/mpp-message-bundle)[ Packagist](https://packagist.org/packages/mpp/message-bundle)[ RSS](/packages/mpp-message-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (7)Versions (15)Used By (0)

Symfony Bundle to handle message delivery
=========================================

[](#symfony-bundle-to-handle-message-delivery)

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

[](#installation)

To install this bundle, simply run the following command:

```
$ composer require mpp/message-bundle
```

Check if this line `Mpp\MessageBundle\MppMessageBundle::class => ['all' => true],` has beend added into `config/bundles.php`

How to use
----------

[](#how-to-use)

First you have to configure your messages config in `config/packages/mpp_message.yaml`:

```
mpp_message:
    messages:
        message_1:
            from: 'no-reply@test.com'
            subject: 'Message subject 1'
            template_txt: 'email/message_1_template.txt.twig'
            template_html: 'email/message_1_template.html.twig'
            attachments: # This parameter is optional
                -
                    file: 'https://fr.wikipedia.org/wiki/GitHub#/media/Fichier:Octicons-mark-github.svg' #You can use path internal or external with url
                    name: 'github.svg'
                    mime_type: 'image/svg+xml'

        message_2:
            from: 'no-reply@test.com'
            subject: 'Message subject 2'
            template_txt: 'email/message_2_template.txt.twig'
            template_html: 'email/message_2_template.html.twig'

        #...
```

Then you can use the `MessageProvider` to send your message like this:

```
//...
use Mpp\MessageBundle\Provider\MessageProvider;

//...
protected MessageProvider $messageProvider;
//...

public function __construct(MessageProvider $messageProvider)
{
    $this->messageProvider = $messageProvider;
}
//...

    // In a function where you want to send message
    $transportOptions = [];
    $contents = [];
    $this->messageProvider->send('message_1', $transportOptions, $contents);

//...
```

How to test
-----------

[](#how-to-test)

Add this config in `config/routes/dev/mpp_message.yaml`

```
mpp_message:
    resource: "@MppMessageBundle/Controller/*.php"
    type: annotation
    prefix: /test
```

Then, if you look at the `config/packages/mpp_message.yaml` file, create two files `message_1_template.html.twig` and `message_1_template.txt.twig` into `template/email` with this structure :

```
Hello {{ fullname|default('John Doe') }} ! =)
```

Now, you can test the following url using GET method (works only in `dev` environment): `http://your-url-project/test/message/send/message_1`The last url path part `message_1` is the message identifier that will be used to send the message.

If you would like to test using custom `transportOptions` and `contents` parameters, you can give them using query parameters like this: `http://your-url-project/test/message/send/message_1?transportOptions[recipientC][]=recipient@demo.fr&contents[fullname]=Test`

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance64

Regular maintenance activity

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor2

2 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 ~230 days

Recently: every ~209 days

Total

9

Last Release

218d ago

Major Versions

v1.0.1 → v2.0.02021-06-02

v2.3.0 → v3.0.02024-05-31

v3.0.1 → v4.0.02025-11-27

PHP version history (2 changes)v1.0.0PHP &gt;=7.4

v4.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0035fe5c6efa0fa3441ef5b7744918deed3b05aae0841d91f7eaca3b42541d33?d=identicon)[monpetitplacement](/maintainers/monpetitplacement)

---

Top Contributors

[![Celine68](https://avatars.githubusercontent.com/u/67600444?v=4)](https://github.com/Celine68 "Celine68 (4 commits)")[![konandrum](https://avatars.githubusercontent.com/u/964354?v=4)](https://github.com/konandrum "konandrum (3 commits)")[![80r1an](https://avatars.githubusercontent.com/u/113115852?v=4)](https://github.com/80r1an "80r1an (2 commits)")[![Gwemox](https://avatars.githubusercontent.com/u/9432727?v=4)](https://github.com/Gwemox "Gwemox (2 commits)")[![Cyr69](https://avatars.githubusercontent.com/u/1540929?v=4)](https://github.com/Cyr69 "Cyr69 (1 commits)")

---

Tags

twigemailyaml

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mpp-message-bundle/health.svg)

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

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M573](/packages/shopware-core)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M735](/packages/sylius-sylius)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)

PHPackages © 2026

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