finity-labs/fin-mail
FinMail adds an email template manager and composer to Filament. Create dynamic, multilingual templates with token replacement and merge tags, version templates, log sent emails with status tracking, override auth mails, and use a reusable “Send Email” action in resources.
Panel, Resource, and Action systems, reducing friction for teams already using Filament.EmailSent, EmailFailed), enabling integration with analytics, CRM systems, or custom workflows without modifying FinMail’s codebase.spatie/laravel-settings for config (auto-installed) but can be replaced with custom storage.{{ user.name }}). Existing Blade views can coexist if wrapped in TemplateMail.{{ user.name }}) and conditionals ({% if %}) add runtime parsing overhead. Edge cases (e.g., circular relations, malformed tokens) may need custom validation.RichContentCustomBlock, which may introduce frontend complexity.spatie/laravel-translatable. Projects with non-standard localization setups may need adjustments.composer require finity-labs/fin-mail.php artisan fin-mail:install with --dry-run (if supported) or review published migrations.TemplateMail.php artisan fin-mail:seed for defaults).SendEmailAction and SentEmailsRelationManager.Mail::send() calls).{{ user.name }}).TemplateMail::make()->with() for non-token data.TemplateMail:
// Before
Mail::to($user)->send(new WelcomeEmail($user));
// After
Mail::to($user)->send(TemplateMail::make('welcome-email')->models(['user' => $user]));
spatie/laravel-settings or filament-shield. Resolve via Composer’s --with-all-dependencies or manual config overrides.EmailSent) to sync with external systems (e.g., CRM, analytics).php artisan vendor:publish --tag=fin-mail-views).config/fin-mail.php (queues, locales, branding).SendEmailAction to Filament resources.SentEmailsRelationManager to models needing email history.spatie/laravel-settings and Filament plugins are managed automatically. Monitor for breaking changes in these packages.php artisan fin-mail:prune-emails) for long-term use.php artisan fin-mail:test to validate template rendering.sent_emails table for failed sends (status = failed).{{ token | debug }} in templates.TemplateMail.failed_jobs table and adjust queue workers.sent_emails(recipient, status) for queries.Mail::later() for time-sensitive sends.| Scenario | Impact | Mitigation |
|---|---|---|
| Database downtime | Emails not logged | Use EmailFailed event to retry or notify admins. |
| Queue worker crash | Emails delayed | Monitor queue backlog; scale workers. |
| Template token errors | Rendering failures | Validate models before sending; use fallbacks ({{ user.name | 'Guest' }}). |
| Editor JS failures | UI broken | Provide fallback Blade templates. |
| Storage limits | Logs fill disk | Schedule cleanup (fin-mail:prune-emails). |
| Filament plugin conflict | Admin panel broken | Isolate FinMail in a separate panel or test in staging. |
How can I help you explore Laravel packages today?