wexample / symfony-mail
Mails for Symfony: a sender every mail goes through, and a development mailbox
3.0.4
2026-10-22 17:03 UTC
Requires
- php: >=8.5
- doctrine/doctrine-bundle: ^2.13 || ^3.0
- doctrine/orm: ^3.0
- symfony/mailer: ^7.4
- symfony/mime: ^7.4 || ^8.0
- symfony/twig-bridge: ^7.4
- wexample/symfony-helpers: >=18.0.2
- wexample/symfony-loader: >=25.0.1
- wexample/symfony-translations: >=17.0.1
Requires (Dev)
- phpunit/phpunit: ^13
- wexample/symfony-testing: >=2.0.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Version: 3.0.4
Mails for Symfony: a sender every mail goes through, and a development mailbox
Table of Contents
Installation
// config/bundles.php Wexample\SymfonyMail\WexampleSymfonyMailBundle::class => ['all' => true],
Development mailbox
# .env.dev MAILER_DSN=mailbox://default
Every mail is then kept in var/mailbox instead of being sent: its raw source as <id>.eml, and a summary as <id>.json. The directory is set by wexample_symfony_mail.mailbox.directory.
The transport is refused in prod: a mail kept on disk is a mail its recipient never gets. The refusal is raised when the mailer first creates its transport, at the first send.
Introduction
Mails for Symfony applications:
MailSenderService, the sender every mail of an application goes through: texts beside the template, a layout, a text part that keeps its links, the recipient's locale, and no rendered mail in a queue or a log (see usage/sending);- a development mailbox, where every mail lands instead of leaving the machine, readable by a page (symfony-mail-ds), a console command and the application's tests.