schvoy/mail-template-bundle
A PHP package for managing and rendering mail templates. Keep transactional email templates organized, edit content without touching code, and render messages with dynamic variables. A lightweight way to centralize mail layouts and reuse them across your application.
composer require schvoy/mail-template-bundle. Note this is a Symfony bundle built on Doctrine, not a native Laravel package. In a Laravel project you’ll need Doctrine (e.g., laravel-doctrine/orm) and Symfony components to use it directly.README.md and the MailTemplateEntityInterface. In v1.0.1 you must implement the entity such that at least one of content or templatePath is set (enforced by the package).MailTemplateEntityInterface (with content or templatePath), persist it, then use the bundle’s rendering service to produce the final email body (likely Twig-based) and send via your mailer.content, templatePath, subject, etc.), and use the bundle’s repository/services to load and render templates by identifier.MailerInterface. For Laravel, consider wrapping this in a job or service that bridges to Laravel’s Mail facade.content or templatePath is present before persisting (mirroring the v1.0.1 rule).content or templatePath is mandatory on MailTemplateEntityInterface. Existing templates without either will fail validation—audit your data before upgrading.content/templatePath is set, verify Twig template paths, and confirm the entity implements the interface correctly. The v1.0.1 rule is enforced; look for validation exceptions or constraint violations.MailTemplateEntityInterface on your own entity, override the rendering service, and use the package’s events/hooks (if exposed) for placeholder resolution. Keep your entity’s validation aligned with the mandatory field rule to avoid runtime surprises.How can I help you explore Laravel packages today?