- Is freshheads/mailer-bundle a Laravel package?
- No. freshheads/mailer-bundle is a Symfony bundle built around Symfony Mailer, not a Laravel package. It relies on Symfony's bundle registry, DI extension, Configuration tree, and container compile-time service definitions, none of which Laravel provides. In a Laravel app it would install via Composer but never boot, so it adds a dependency without adding behavior.
- Can I install freshheads/mailer-bundle in a Laravel application?
- You can run composer require, but the package will not work. A Symfony bundle must be registered in config/bundles.php and compiled into a Symfony container; Laravel has no bundle registry and no equivalent container compilation step. Without that boot process there are no services, no configuration tree, and no mailer behavior, so this is not a viable integration path.
- What does Freshheads Mailer Bundle actually do?
- It packages mailer configuration and services for Symfony applications on top of the Symfony Mailer component. It gives developers a structured way to compose transactional messages, including recipient setup, headers, templated bodies, and attachments, from their own bundles and projects. It is a composition convenience layer, not a transport or delivery service.
- How do I install freshheads/mailer-bundle?
- In a Symfony project, install with composer require freshheads/mailer-bundle, register the bundle in config/bundles.php, and configure it under config/packages. Before adopting it anywhere new, read the composer.json constraints: the last release dates from January 2023 and carries Symfony 5/6-era pins and a PHP floor. Run composer why-not freshheads/mailer-bundle against your target PHP and framework matrix first.
- Does freshheads/mailer-bundle support Laravel 11 or Laravel 12?
- No. Laravel does not use Symfony's bundle registry or container compilation, so the bundle's services and configuration would never load. On top of that, the package's 2023 constraint pins are likely to conflict with Laravel 11 or 12 on PHP 8.2 and above. The practical risk is lockfile friction, not runtime errors.
- What should I use instead of freshheads/mailer-bundle in Laravel?
- Use Laravel's native mail system: Mailable classes with Blade or Markdown templates, transport settings in config/mail.php, and Laravel queues for async sending and retries. Laravel's Illuminate\Mail\Mailer already wraps symfony/mailer transports and symfony/mime message construction, so the primitives this bundle builds on are already in your dependency tree. That makes the bundle redundant rather than complementary for a Laravel codebase.
- Is freshheads/mailer-bundle maintained and safe for production?
- Treat it as high risk. The last release was 2023-01-12, the repository has zero stars and zero dependents, and it comes from a single vendor with no third-party battle testing, CVE watch, or visible issue triage. The main production hazard is upgrade friction: a stale symfony/http-kernel pin can block PHP and framework upgrades for zero functional gain.
- Can I reuse the message composition patterns from FHMailerBundle in Laravel?
- Yes, and that is the sensible middle path if you like the API shape. Read the composition classes and reimplement the useful idioms, such as header assembly, templated bodies, and attachment handling, as app-local code. You get the patterns without inheriting a stale dependency or a Symfony-only boot requirement.
- How do I migrate a Symfony service using FHMailerBundle to Laravel?
- It is a translation, not an integration. Map each bundle-composed message to a Mailable class, move templates to Blade or Markdown mail, re-express transport configuration in config/mail.php, and re-express queue and retry semantics with Laravel queues. Keep recipients, headers, and attachments identical so the diff is testable.
- How do I test emails after replacing FHMailerBundle with Laravel Mailable?
- Use Mail::fake() and assertSent or assertQueued, then check subjects, recipients, and attachments with the Mailable assertions. Rendering the Mailable and asserting the HTML is a good way to protect template behavior during migration. Also run composer why-not freshheads/mailer-bundle against your target matrix before writing any code, so you know the constraints are workable.