- Is druidvav/email-bundle compatible with Laravel?
- No. druidvav/email-bundle is a Symfony 4.4 bundle, not a Laravel package. It relies on Symfony bundle registration in config/bundles.php, FrameworkBundle, TwigBundle, a dv_email config tree, and Symfony's event dispatcher, none of which map onto Laravel service providers or config/mail.php. There is no compatibility shim worth writing, so treat it as a design reference rather than a dependency.
- Can I install druidvav/email-bundle in a Laravel 10 or 11 app?
- No, not viably. The bundle pins Symfony ^4.4 components, while Laravel 10 and 11 require Symfony 6 or 7 components. Composer will fail dependency resolution before installation, which at least fails fast. Do not attempt to force it with ignore-platform-reqs or repository overrides.
- What does druidvav/email-bundle actually do?
- It orchestrates transactional email in Symfony: Twig-rendered subject, plain text, and HTML; CSS inlining via Pelago Emogrifier with optional cache; cid: image embedding; four lifecycle events for before/after render and send; per-render locale switching with state restore; and multiple sender profiles mapped to named MailerInterface services. Sending uses symfony/mailer, not SwiftMailer. In Laravel terms, it is roughly a MailComposer-style service plus a config array.
- Does Laravel already support CSS inlining and embedded images for mail?
- Yes, mostly. Laravel Markdown mail uses tijsverkoyen/css-to-inline-styles for CSS inlining, $message->embed() handles cid: images, and Laravel 9+ ships symfony/mailer. Laravel also exposes MessageSending and MessageSent events that correspond to the bundle's before-send and after-send hooks. The bundle's marginal value over native Laravel is mainly its config schema and event naming convention.
- Does druidvav/email-bundle use SwiftMailer or Symfony Mailer?
- It uses Symfony Mailer via symfony/mailer, which pulls in symfony/mime. The repository includes a MIGRATION.md documenting the move away from SwiftMailer. Any evaluation that describes this bundle as SwiftMailer-based is stale and should be corrected.
- Is druidvav/email-bundle maintained and safe for production?
- Poorly. The repository has 0 stars, 0 dependents, a single maintainer, and README-only documentation in Russian. It is pinned to Symfony 4.4, which reached end of life in November 2023, and requires PHP 7.4 or newer. Bus factor is 1, so it is not suitable as a production dependency.
- What license is druidvav/email-bundle released under?
- The repository shows no license file and no license statement in the README. Copying the source into a commercial codebase without a license is a legal exposure. Obtain written permission from the maintainer or reimplement from the documented behavior rather than the code. Escalate this before spending engineering time on a port.
- How does druidvav/email-bundle handle locale switching, and is that safe in Laravel queue workers?
- During rendering it swaps the RequestContext, translator locale, and optionally Gedmo Translatable, then restores the previous state. In Laravel, App::setLocale() and a mailable's locale() method cover the same need without a bundle. Per-render locale mutation is risky under queue workers because state can persist across jobs. Set the locale explicitly per job or mailable and restore it in a finally block.
- Can I run druidvav/email-bundle as a sidecar microservice instead of installing it in Laravel?
- It is technically possible to run a Symfony 4.4 app exposing a render or send endpoint, but it adds a deploy target, a network hop, a second auth surface, and a second end-of-life framework to patch. That is a lot of operational cost to obtain CSS inlining and image embedding that Laravel already provides. Reject it unless an existing Symfony 4.4 application in your estate already uses the bundle.
- What is the best Laravel alternative for transactional email with per-recipient locale and multiple senders?
- Use native Laravel Mail: Markdown mailables with css-to-inline-styles, $message->embed() for cid images, Mail::mailer() for multiple sender profiles, and locale() or App::setLocale() for per-recipient locale. Use MessageSending and MessageSent events for lifecycle hooks, or wrap rendering in a small MailComposer service for before/after-render hooks. If you want the bundle's config schema and event naming, port those ideas into an internal Laravel package rather than adopting the Symfony artifact.