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

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

formatd/mailer
==============

Wrapper for SymfonyMailer in Neos Flow Projects

v2.0.1(2mo ago)010.1k↓33.3%2[1 issues](https://github.com/Format-D/FormatD.Mailer/issues)[1 PRs](https://github.com/Format-D/FormatD.Mailer/pulls)MITPHPPHP ^8.1

Since Jun 24Pushed 1mo agoCompare

[ Source](https://github.com/Format-D/FormatD.Mailer)[ Packagist](https://packagist.org/packages/formatd/mailer)[ RSS](/packages/formatd-mailer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (22)Used By (0)

FormatD.Mailer
==============

[](#formatdmailer)

A Template Mailer for Neos Flow or/and CMS Projects.

What does it do?
----------------

[](#what-does-it-do)

This package provides a service class intended to be used as base class for sending Fluid templates as mails. In addition it contains a debugging aspect for cutting off and/or redirecting all mails (sent by SymfonyMailer) in a development environment. Moreover, it supports using environment variables to build the DSN for the Symfony Mailer.

Kompatiblität
-------------

[](#kompatiblität)

Versioning scheme:

```
 1.0.0
 | | |
 | | Bugfix Releases (non breaking)
 | Neos Compatibility Releases (non breaking except framework dependencies)
 Feature Releases (breaking)

```

Releases und compatibility:

Package-VersionNeos Flow Version`neos/form` Version2.0.x8.x&gt;= 6.0.01.1.x&gt;= 6.x &lt;= 8.x&lt; 6.0.01.0.x4.x - 5.x&lt; 6.0.0Using the service in your own plugins to use fluid templates for mails
----------------------------------------------------------------------

[](#using-the-service-in-your-own-plugins-to-use-fluid-templates-for-mails)

Configure default from address:

```
FormatD:
  Mailer:
    defaultFrom:
      address: 'example@example.com'
      name: 'Example'

```

Extend AbstractMailerService and add methods as needed following the example of sendTestMail().

intersept all mails in a dev environment
----------------------------------------

[](#intersept-all-mails-in-a-dev-environment)

Configure swiftmailer to intersept all mails send by your neos installation (not only by the service).

This is an example which intercepts all mails and redirects them to  and :

```
FormatD:
  Mailer:
    interceptAll:
      active: true
      recipients: ['example@example.com', 'secondexample@example.com']
    bccAll:
      active: false
      recipients: []

```

Handling Embedded Images
------------------------

[](#handling-embedded-images)

The method `AbstractMailerService->setMailContentFromStandaloneView()` has a parameter to embed all images into the mail body. This is handy if you have an installation that is protected by a .htaccess file for example, or the user may not have access to the internet when reading the email. GMail also cannot display images if they are included from a local domain.

FormatD.Mailer can be configured to replace all image urls by local paths (if you specify a baseUrl in your flow configuration). This is needed it the server cannot make a web-request to itself (also maybe due to a .htaccess or something).

```
FormatD:
  Mailer:
    localEmbed: true

```

Disable embed for specific images
---------------------------------

[](#disable-embed-for-specific-images)

You can disable image embedding for specific images by adding `data-fdmailer-embed="disable"` as data attribute to the image tag. This is useful for tracking pixels where you dont want the local embedding.

Using environment variables to build a SMTP transport DSN
---------------------------------------------------------

[](#using-environment-variables-to-build-a-smtp-transport-dsn)

Use the special DSN `fd-mailer` in the SymfonyMailer configuration. This transport will then use the configuration given under `FormatD.Mailer.smtpTransport` to build the actual DSN and actual SmtpTransport object. `host` is mandatory, all other parts are optional.

For special cases the automatic DSN construction can be omitted by passing the DSN directly at `Neos.SymfonyMailer.mailer.dsn`.

```
Neos:
  SymfonyMailer:
    mailer:
      dsn: 'fd-mailer'

FormatD:
  Mailer:
    smtpTransport:
      host: '%env:SMTP_HOST%'
      encryption: '%env:SMTP_ENCRYPTION%'
      port: '%env:SMTP_PORT%'
      username: '%env:SMTP_USERNAME%'
      password: '%env:SMTP_PASSWORD%'

      # Optional: Query params appended to the DSN, use with caution and only when necessary
      options:
        # Do not verify server TLS certificate
        verify_peer: 1
        # Do not try `STARTTLS` at all
        auto_tls: 'false'
        # Use `STARTTLS` even when not announced in server capabilities
        require_tls: 'true'

```

The `encryption` param is cast to boolean, with the `'false'` string being interpreted falsy as well. If true, the scheme will be `smtps`, thus the Symfony SMTP transport tries to establish a TLS encrypted channel right away. If `encryption` is false, then the transport will still try to upgrade the connection via `STARTTLS`, when that is announced by the server!

The `options` config is completely optional and could be omitted to use SymfonyMailer's sane defaults. It can be used to define query parameters appended to the DSN, as described in the [SymfonyMailer documentation](https://symfony.com/doc/current/mailer.html).

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance87

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 64.7% 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 ~145 days

Recently: every ~337 days

Total

18

Last Release

52d ago

Major Versions

v1.1.11 → v2.0.02025-07-08

### Community

Maintainers

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

---

Top Contributors

[![bweinzierl](https://avatars.githubusercontent.com/u/30659291?v=4)](https://github.com/bweinzierl "bweinzierl (22 commits)")[![fza](https://avatars.githubusercontent.com/u/578502?v=4)](https://github.com/fza "fza (10 commits)")[![samsauter](https://avatars.githubusercontent.com/u/8954166?v=4)](https://github.com/samsauter "samsauter (2 commits)")

### Embed Badge

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

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[neos/neos

An open source Content Application Platform based on Flow. A set of core Content Management features is resting within a larger context that allows you to build a perfectly customized experience for your users.

116989.0k674](/packages/neos-neos)[netflie/laravel-notification-whatsapp

Laravel notification driver for WhatsApp

176173.9k](/packages/netflie-laravel-notification-whatsapp)[sandstorm/templatemailer

Neos and Flow package for simple handling of template-based emails, including CSS inlining

1147.3k2](/packages/sandstorm-templatemailer)

PHPackages © 2026

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