- What is FinMail used for in a Laravel application?
- FinMail is an email template manager and composer built for Filament admin panels. It lets you create dynamic, translatable email templates with token replacement, CTA blocks, themes, and version history, then send them from any Filament resource. It also logs sent emails with status tracking and provides a reusable Send Email action. The package complements Laravel Mail, Queues, and Events rather than replacing them.
- How do I install finity-labs/fin-mail?
- Install it with Composer and run the fin-mail:install CLI command, which handles migrations, config, and locale setup. The package requires Filament 4 or 5; no manual database schema changes are needed beyond the settings table. You should review the published config and confirm your locale strategy during installation.
- Which Filament versions does FinMail support?
- The README badges and evaluation confirm support for Filament 4.x and 5.x. Because the package leans on Filament UI components such as RichEditor, actions, and resources, major Filament upgrades should be tested before adoption. Check the Composer constraints for the exact Laravel versions supported by your chosen release.
- How does FinMail token replacement handle missing data and conditionals?
- FinMail resolves tokens such as {{ user.name }} and {{ config.app.name }} at render time and supports conditionals like {% if user.is_premium %}. You can provide fallbacks such as {{ user.name | 'Customer' }} so missing values render predictably instead of breaking the email. Tokens are also exposed as merge tags in the RichEditor toolbar for easier insertion. Complex or malformed tokens should be covered by your own validation and testing.
- Can I send a template email from an existing Filament resource?
- Yes. FinMail provides a reusable SendEmailAction that can be added to table rows, headers, or other resource actions, along with a SentEmailsRelationManager for viewing history. The composer uses a template as a starting point but still lets the sender edit the subject, body, recipients, and attachments before sending. This replaces custom send-email logic scattered across resources.
- Do I still need separate Mailable classes with FinMail?
- FinMail uses one universal TemplateMail class for templates, so you generally do not need a separate Mailable class for every email. Existing Mailable classes can be integrated through the TemplateMail wrapper, which helps during a phased migration. Custom Blade views and view overrides are still supported when you need tighter control over markup.
- How does FinMail template versioning work?
- FinMail automatically keeps a version history whenever templates change, with preview and one-click restore. This lets teams edit live templates without losing the previous content or relying on manual backups. You should still include template changes in your normal deployment and review process.
- Is FinMail email logging and storage safe for production or GDPR?
- FinMail logs every sent email with status tracking, rendered body storage, and polymorphic model association, and those logs are persistent by default. That is useful for auditing and support, but high-volume systems should plan retention policies and storage growth. The package is modular, so logging and other features can be selectively disabled to match compliance requirements.
- How do I set up multilingual email templates in FinMail?
- FinMail uses spatie/laravel-translatable for multilingual templates, and locale setup is part of the fin-mail:install flow. You should decide whether locales are static or user-selected before configuring templates, because dynamic locale management needs additional planning. Test translated templates and fallback behavior in staging before rolling them out.
- How can I customize FinMail email themes and layouts?
- FinMail stores email themes and color schemes in an email_themes table and supports custom Blade views for layout overrides. Custom editor blocks and deeper UI changes require manual implementation, and custom themes must align with Filament's Tailwind CSS setup using @source directives. Start with the default themes and only override what your brand actually needs.