PHPackages                             ssddanbrown/symfony-mailer - 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. ssddanbrown/symfony-mailer

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

ssddanbrown/symfony-mailer
==========================

Helps sending emails

7.2.x-dev(1y ago)0158.7k↓13.3%MITPHPPHP &gt;=8.2

Since Jul 4Pushed 1y agoCompare

[ Source](https://github.com/ssddanbrown/symfony-mailer)[ Packagist](https://packagist.org/packages/ssddanbrown/symfony-mailer)[ Docs](https://symfony.com)[ RSS](/packages/ssddanbrown-symfony-mailer/feed)WikiDiscussions 7.2 Synced 1mo ago

READMEChangelogDependencies (10)Versions (4)Used By (0)

Mailer Component
================

[](#mailer-component)

The Mailer component helps sending emails.

Note: This is a (hopefully temporary) fork of [symfony/mailer](https://github.com/symfony/mailer) to patch in TLS assurance for use in BookStack. It's not advised to use this library fork for other projects. It only contains/patches the single branch used by BookStack.

Getting Started
---------------

[](#getting-started)

```
composer require symfony/mailer
```

```
use Symfony\Component\Mailer\Transport;
use Symfony\Component\Mailer\Mailer;
use Symfony\Component\Mime\Email;

$transport = Transport::fromDsn('smtp://localhost');
$mailer = new Mailer($transport);

$email = (new Email())
    ->from('hello@example.com')
    ->to('you@example.com')
    //->cc('cc@example.com')
    //->bcc('bcc@example.com')
    //->replyTo('fabien@example.com')
    //->priority(Email::PRIORITY_HIGH)
    ->subject('Time for Symfony Mailer!')
    ->text('Sending emails is fun again!')
    ->html('See Twig integration for better HTML integration!');

$mailer->send($email);
```

To enable the Twig integration of the Mailer, require `symfony/twig-bridge` and set up the `BodyRenderer`:

```
use Symfony\Bridge\Twig\Mime\BodyRenderer;
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\Mailer\EventListener\MessageListener;
use Symfony\Component\Mailer\Mailer;
use Symfony\Component\Mailer\Transport;
use Twig\Environment as TwigEnvironment;

$twig = new TwigEnvironment(...);
$messageListener = new MessageListener(null, new BodyRenderer($twig));

$eventDispatcher = new EventDispatcher();
$eventDispatcher->addSubscriber($messageListener);

$transport = Transport::fromDsn('smtp://localhost', $eventDispatcher);
$mailer = new Mailer($transport, null, $eventDispatcher);

$email = (new TemplatedEmail())
    // ...
    ->htmlTemplate('emails/signup.html.twig')
    ->context([
        'expiration_date' => new \DateTimeImmutable('+7 days'),
        'username' => 'foo',
    ])
;
$mailer->send($email);
```

Sponsor
-------

[](#sponsor)

The Mailer component for Symfony 7.2 is [backed](https://symfony.com/backers) by:

- [Sweego](https://www.sweego.io/), a European email and SMS sending platform for developers and product builders. Easily create, deliver, and monitor your emails and notifications.

Help Symfony by [sponsoring](https://symfony.com/sponsor) its development!

Resources
---------

[](#resources)

- [Documentation](https://symfony.com/doc/current/mailer.html)
- [Contributing](https://symfony.com/doc/current/contributing/index.html)
- [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls)in the [main Symfony repository](https://github.com/symfony/symfony)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance41

Moderate activity, may be stable

Popularity31

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

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

Total

4

Last Release

492d ago

Major Versions

6.4.x-dev → 7.2.x-dev2025-01-11

PHP version history (3 changes)6.0.x-devPHP &gt;=8.0.2

6.3.x-devPHP &gt;=8.1

7.2.x-devPHP &gt;=8.2

### Community

Maintainers

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

---

Top Contributors

[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (279 commits)")[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (271 commits)")[![derrabus](https://avatars.githubusercontent.com/u/1506493?v=4)](https://github.com/derrabus "derrabus (64 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (53 commits)")[![OskarStark](https://avatars.githubusercontent.com/u/995707?v=4)](https://github.com/OskarStark "OskarStark (12 commits)")[![alexandre-daubois](https://avatars.githubusercontent.com/u/2144837?v=4)](https://github.com/alexandre-daubois "alexandre-daubois (11 commits)")[![fancyweb](https://avatars.githubusercontent.com/u/3658119?v=4)](https://github.com/fancyweb "fancyweb (9 commits)")[![chalasr](https://avatars.githubusercontent.com/u/7502063?v=4)](https://github.com/chalasr "chalasr (9 commits)")[![lyrixx](https://avatars.githubusercontent.com/u/408368?v=4)](https://github.com/lyrixx "lyrixx (7 commits)")[![Tobion](https://avatars.githubusercontent.com/u/610090?v=4)](https://github.com/Tobion "Tobion (7 commits)")[![arnt](https://avatars.githubusercontent.com/u/236384?v=4)](https://github.com/arnt "arnt (6 commits)")[![jderusse](https://avatars.githubusercontent.com/u/578547?v=4)](https://github.com/jderusse "jderusse (6 commits)")[![wouterj](https://avatars.githubusercontent.com/u/749025?v=4)](https://github.com/wouterj "wouterj (6 commits)")[![Koc](https://avatars.githubusercontent.com/u/191082?v=4)](https://github.com/Koc "Koc (5 commits)")[![plandolt](https://avatars.githubusercontent.com/u/922919?v=4)](https://github.com/plandolt "plandolt (3 commits)")[![bocharsky-bw](https://avatars.githubusercontent.com/u/3317635?v=4)](https://github.com/bocharsky-bw "bocharsky-bw (2 commits)")[![dmaicher](https://avatars.githubusercontent.com/u/921145?v=4)](https://github.com/dmaicher "dmaicher (2 commits)")[![GromNaN](https://avatars.githubusercontent.com/u/400034?v=4)](https://github.com/GromNaN "GromNaN (2 commits)")[![kbond](https://avatars.githubusercontent.com/u/127811?v=4)](https://github.com/kbond "kbond (2 commits)")[![kgnblg](https://avatars.githubusercontent.com/u/18302892?v=4)](https://github.com/kgnblg "kgnblg (2 commits)")

### Embed Badge

![Health badge](/badges/ssddanbrown-symfony-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/ssddanbrown-symfony-mailer/health.svg)](https://phpackages.com/packages/ssddanbrown-symfony-mailer)
```

###  Alternatives

[symfony/mailer

Helps sending emails

1.6k368.1M955](/packages/symfony-mailer)[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)

PHPackages © 2026

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