- Is hautzi/system-mail-bundle a Laravel package or a Symfony bundle?
- It is a Symfony bundle, not a Laravel package. It ships a Bundle class registered in Symfony's kernel and depends on Symfony's DI container and compiler-pass lifecycle. Laravel uses individual Symfony components but has no bundle loader and no config/bundles.php, so there is no framework hook that would ever boot it. Composer will install it, but nothing in a Laravel app will consume it.
- Can I install hautzi/system-mail-bundle in a Laravel app with Composer?
- The install may succeed, but the package will do nothing usable. Laravel has no bundle registration mechanism, so the service definitions, compiler passes, and mailer wiring never execute. You would also likely hit dependency conflicts first, because the package pins 2018-era PHP and Symfony constraints. Treat any successful install as a false positive, not a working integration.
- Does Laravel already support localized transactional emails without this package?
- Yes. Mailable::locale() sets the locale for a single send, lang/{locale} files hold the subject and body translations, and Mail::to($user)->locale($user->locale)->send(new WelcomeMail($user)) handles per-recipient localization. That covers the core use case the bundle advertises. The only capability Laravel lacks out of the box is database-editable templates managed by non-engineers.
- What PHP and Symfony versions does hautzi/system-mail-bundle require?
- The last release was December 2018, so its composer.json almost certainly targets PHP 7.x with Symfony 3 or 4. Those constraints will conflict with a modern Laravel 10 or 11 dependency graph on PHP 8.2+ rather than merely failing at runtime. Check the composer.json before assuming you can force-install it, because ignoring platform requirements tends to break other packages.
- Does hautzi/system-mail-bundle still work with Symfony Mailer or modern transports?
- Almost certainly not on a current stack. The 2018 send path was built around Swiftmailer, which reached end of life in November 2021 and was removed from Symfony. Even inside a Symfony application the transport layer would need rewriting. Since the bundle is also not usable in Laravel at all, this is a secondary concern for Laravel teams.
- What is the one feature of this bundle actually worth reimplementing in Laravel?
- Database-backed, admin-editable email templates keyed by a code and a locale, with a resolution order and fallback chain. That is the genuine differentiator, and it is roughly 200 lines of Laravel code including a model, a migration, and a small service. Everything else it offers is already native to Laravel's Mail facade and translation files.
- How would I port the system mail template concept to Laravel?
- Create a system_mails table with code, locale, subject, body_html, body_text, version, updated_by, and timestamps, with a unique index on code plus locale. Add a SystemMailTemplate Eloquent model with a render(array $params) method, and a SystemMailer service exposing send(string $code, array $params, Notifiable $to, ?string $locale = null). Have the service walk the locale fallback chain, throw a loud exception on a miss, and dispatch through a queued Mailable. Do not fork the bundle itself; carry over only the schema and the resolution semantics.
- Is it safe to render database-stored email templates with Blade or Twig?
- Stored templates rendered as executable template code are a server-side template injection surface if anyone untrusted can edit them. Restrict editing to trusted roles, keep template versions and an audit trail of who changed what, and prefer a restricted placeholder substitution syntax over full Blade or Twig evaluation. Any port of this bundle should decide this explicitly rather than inheriting the original's assumptions.
- Is hautzi/system-mail-bundle still maintained, and are there known production users?
- No. The last release was December 2018, it has around 18 stars and zero dependents, and there is no issue-tracker signal to learn from. There is no third party to ask about edge cases and no evidence of production validation. Owning an abandoned Symfony bundle inside a Laravel codebase is a permanent maintenance tax, which is why porting the idea beats forking the code.
- What should the locale fallback chain look like for system-generated emails?
- A common and defensible chain is recipient locale, then application default locale, then English as a final catch-all. The important part is deciding whether a silent fallback is acceptable for legally or financially sensitive mail, such as a German invoice notification arriving in English. Encode the order in the resolver, log every fallback that occurs, and make a hard miss throw rather than send an empty body.