rezzza/mail-extra-bundle
Rezzza MailExtraBundle is a small Symfony bundle that extends the framework's mailer with extra features, making it easier to customize how outgoing email is prepared and sent in your application. Lightweight, simple to install, and easy to integrate into existing projects.
swiftmailer-bundle, this bundle is a signal that (a) those services need a mail-stack migration to Symfony Mailer, and (b) the redirect/disable logic must be re-implemented, not ported. Slot it into the platform modernization epic rather than the feature backlog.Adopt only if all of the following are true:
symfony/swiftmailer-bundle.Swift_Mailer service rather than via configuration.Look elsewhere — i.e., in almost every other case:
MAIL_MAILER=log|array, Mailpit/MailHog locally, Mail::fake() in tests, and Mail::alwaysTo() for a global redirect. Zero dependencies, first-party, maintained.MessageEvent to rewrite the envelope, plus framework.mailer.dsn and disable_delivery. The WebProfiler mailer panel already covers the "see what would be sent" need.swiftmailer.disable_delivery and the profiler's mailer interception existed alongside this bundle; if the only thing you want is "don't send," the bundle is redundant.Adoption cost if you proceed anyway: trivial install, but an ongoing tax — an unmaintained package pinned in composer.json, a blocker on the PHP/Symfony upgrade path, and an explicit exception in your dependency policy.
For executives (30 seconds): We evaluated a library that stops non-production environments from emailing real customers — a real risk with real reputational cost, and one we should close. The library itself is not adoptable: it was last released in 2015, has six stars, no downstream users, and wraps Swift Mailer, which the PHP ecosystem has retired. Recommendation: do not add the dependency. The same protection is roughly one engineering day using first-party framework features (Symfony Mailer event listeners; Laravel's mail redirect and log drivers). We get the risk reduction with no supply-chain exposure and no upgrade blocker. I'd like the "safe mail" guardrail added to the pre-launch checklist for every environment.
For engineering (the ask): Read rezzza/MailExtraBundle as a spec, not as a dependency. Our implementation should mirror its intent — a mailer decorator that (1) rewrites all recipients to a configured sink address outside production, (2) supports an explicit disable_delivery toggle, (3) prefixes subjects with the environment, and (4) logs the original recipients for debugging. On Symfony, wire it as a MessageEvent listener on the Mailer component; on Laravel, a Mail::alwaysTo() call plus driver config. Ship it as shared platform config so no product team has to think about it again, and add a test asserting that a production-like config with a non-production environment variable cannot deliver to a real domain.
How can I help you explore Laravel packages today?