PHPackages                             donkeycode/mail-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. donkeycode/mail-bundle

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

donkeycode/mail-bundle
======================

An easy way to send mail with swiftmailer and twig

v1.0.0(9y ago)310.0k2[1 PRs](https://github.com/donkeycode/mail-bundle/pulls)MITPHP

Since Nov 24Pushed 1y ago3 watchersCompare

[ Source](https://github.com/donkeycode/mail-bundle)[ Packagist](https://packagist.org/packages/donkeycode/mail-bundle)[ RSS](/packages/donkeycode-mail-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (5)Used By (0)

MailBundle
==========

[](#mailbundle)

An easy way to send mail with twig and swift

Setup
-----

[](#setup)

```
composer require donkeycode/mail-bundle

```

Add in `AppKernel.php`

```
new DonkeyCode\MailBundle\DonkeyCodeMailBundle(),

```

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

[](#configuration)

```
donkey_code_mail:
    mail_from: null
    reply_to: null
    options:
        header_bg: '#2d7cff'
        header_txt_color: '#ffffff'
        bg: '#efefef'
        txt_color: '#555555'
        font_family: 'Helvetica Neue'

```

Usage
-----

[](#usage)

Create your twig

```
{% block subject %}
Subject of mail
{% endblock %}

{% block body %}
    {% embed "DonkeyCodeMailBundle:Mails:layout.html.twig" %}
    {# For sf4 #}
    {% embed "@DonkeyCodeMail/Mails/layout.html.twig" %}
        {% block title %}Header{% endblock %}
        {% block content %}
            Body Of mail
        {% endblock %}

    {% endembed %}
{% endblock %}

```

Send it simply

```
$mailer = $this->getContainer()
    ->get('donkeycode.mailer')
    ->createMessage()
    ->setTemplate('YourBundle:Mails:invoices.html.twig', [
        'invoices' => $invoices,
    ])
    ->setTo($destMail)
    ->send();

```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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

Unknown

Total

1

Last Release

3509d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/52d4597d48c6639975152add5a1dccb0533f51f811cd124fc01a34938bbbf197?d=identicon)[cedriclombardot](/maintainers/cedriclombardot)

---

Top Contributors

[![cedriclombardot](https://avatars.githubusercontent.com/u/651484?v=4)](https://github.com/cedriclombardot "cedriclombardot (18 commits)")[![RaphaelYan](https://avatars.githubusercontent.com/u/10617497?v=4)](https://github.com/RaphaelYan "RaphaelYan (1 commits)")[![stadja](https://avatars.githubusercontent.com/u/848185?v=4)](https://github.com/stadja "stadja (1 commits)")

---

Tags

bundlesymfonysymfony-bundlesymfony2symfony3twig

### Embed Badge

![Health badge](/badges/donkeycode-mail-bundle/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)

PHPackages © 2026

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