PHPackages                             neos/symfonymailer - 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. neos/symfonymailer

ActiveNeos-package[Mail &amp; Notifications](/categories/mail)

neos/symfonymailer
==================

A Flow package for easy use of the Symfony Mailer

1.0.2(6mo ago)534.7k↓42.6%2[1 issues](https://github.com/neos/symfonymailer/issues)[1 PRs](https://github.com/neos/symfonymailer/pulls)5MITPHPPHP ^8.2

Since Feb 17Pushed 4mo ago11 watchersCompare

[ Source](https://github.com/neos/symfonymailer)[ Packagist](https://packagist.org/packages/neos/symfonymailer)[ Fund](https://shop.neos.io/neosfunding/)[ RSS](/packages/neos-symfonymailer/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (5)

Neos SymfonyMailer
==================

[](#neos-symfonymailer)

The Mailer package facilitates email sending via the Symfony/Mailer package and simplifies its usage with the standard method of Neos.Flow configuration.

The package can also facilitate a smoother migration from the old Swiftmailer package to the new Symfony/Mailer package.

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

[](#getting-started)

```
$ composer require neos/symfonymailer

```

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

[](#configuration)

The package provides a default configuration for the Symfony/Mailer package. You can override the default configuration by adding the following configuration to your `Settings.yaml`:

```
Neos:
  SymfonyMailer:
    mailer:
      dsn: 'smtp://localhost'
```

The `dsn` parameter is the only required parameter. It should be a valid DSN string for the Symfony/Mailer package. If you migrate from Swiftmailer, you can use the following command to generate the DSN:

```
./flow symfonymailer:migrate:generatedsnfromswiftmailer
```

Usage
-----

[](#usage)

You can test the mailer configuration by sending a test email:

```
./flow symfonymailer:test:send --from="team@neos.io" --to="jon@doe.com" --subject="Test email" --body="This is a test email"
```

The package’s design principle is to minimize modifications to the original mailer package. Consequently, only the classes of Symfony/Mailer are utilized for emails, attachments, and so on. The package solely provides a service to initialize the mailer with the configuration. Additionally, the package provides a command to send test emails and migrate the SwiftMailer configuration to an appropriate DSN for Symfony/Mailer.

If you use the `LoggingTransport` or `MboxTransport` from SwiftMailer, there is no replacement for the Symfony/Mailer package.

**Basic Example**

```
#[Flow\Inject]
protected MailerService $mailerService;

public function sendEmail(string $from, string $to, string $subject, string $body): void
{
	$email = new Email();
	$email
		->from($from)
		->to($to)
		->subject($subject)
		->text($body);

	$mailer = $this->mailerService->getMailer();
	$mailer->send($email);
}
```

Migrate from Swiftmailer
------------------------

[](#migrate-from-swiftmailer)

As previously mentioned, the package includes a command to generate a DSN from the Swiftmailer configuration. To utilize this command, you must have the Swiftmailer configuration located in your `Settings.yaml` file.

You can use the following command to generate the DSN.

```
./flow symfonymailer:migrate:generatedsnfromswiftmailer
```

The PHP code within your package requires some modifications. To facilitate the migration process, there are several rector rules available that facilitate the transition from Swiftmailer to Symfony/Mailer.

- [SwiftMessageToEmailRector](https://getrector.com/rule-detail/swift-message-to-email-rector)
- [SwiftCreateMessageToNewEmailRector](https://getrector.com/rule-detail/swift-create-message-to-new-email-rector)
- [SwiftSetBodyToHtmlPlainMethodCallRector](https://getrector.com/rule-detail/swift-set-body-to-html-plain-method-call-rector)

Utilizing these tools, it is feasible to migrate your codebase to Symfony/Mailer.

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance68

Regular maintenance activity

Popularity36

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity54

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

Total

4

Last Release

199d ago

Major Versions

0.1.0 → 1.0.02025-02-17

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11575267?v=4)[Neos](/maintainers/neos)[@neos](https://github.com/neos)

---

Top Contributors

[![markusguenther](https://avatars.githubusercontent.com/u/1014126?v=4)](https://github.com/markusguenther "markusguenther (3 commits)")[![Benjamin-K](https://avatars.githubusercontent.com/u/3098031?v=4)](https://github.com/Benjamin-K "Benjamin-K (2 commits)")[![bwaidelich](https://avatars.githubusercontent.com/u/307571?v=4)](https://github.com/bwaidelich "bwaidelich (1 commits)")[![dlubitz](https://avatars.githubusercontent.com/u/13046100?v=4)](https://github.com/dlubitz "dlubitz (1 commits)")

---

Tags

mailerneoscms

### Embed Badge

![Health badge](/badges/neos-symfonymailer/health.svg)

```
[![Health](https://phpackages.com/badges/neos-symfonymailer/health.svg)](https://phpackages.com/packages/neos-symfonymailer)
```

###  Alternatives

[illuminate/mail

The Illuminate Mail package.

5910.6M500](/packages/illuminate-mail)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[symfony/mailgun-mailer

Symfony Mailgun Mailer Bridge

14538.8M98](/packages/symfony-mailgun-mailer)[symfony/postmark-mailer

Symfony Postmark Mailer Bridge

4820.4M66](/packages/symfony-postmark-mailer)[symfony/mailchimp-mailer

Symfony Mailchimp Mailer Bridge

286.4M20](/packages/symfony-mailchimp-mailer)[symfony/mailjet-mailer

Symfony Mailjet Mailer Bridge

485.3M15](/packages/symfony-mailjet-mailer)

PHPackages © 2026

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