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.
MissingSettings exception during artisan boot when scheduled cleanup is registered before the fin-mail-logging settings have been migrated. The catch around app(LoggingSettings::class) didn't cover the lazy property access that actually triggers the load, so the exception escaped and broke package:discover and fin-mail:install in some setups (#13, thanks @devrizzz)spatie/laravel-settings is now mentioned explicitly in the README as an auto-installed dependencyPreview, SendTest, Compose (Email Templates) and Resend (Sent Emails) are now hidden from the UI when Filament Shield is installed and the authenticated user lacks the corresponding permission. Falls back to the previous always-visible behavior when Shield is absent, so existing installs are unaffected (#12, thanks @agencetwogether)FinMailPlugin::isShieldAvailable() helper for checking Shield presencepreview_heading translation key for the preview modal header, populated across all 58 supported localesInstallCommand now seeds preview, sendTest, compose, and resend into the Filament Shield config so shield:generate produces the matching policy methods and permissionsauthorizeIndividualRecords('delete') when Shield is activephp artisan shield:generate --panel=admin --option=policies_and_permissions to register the new permissionsextraData() method (and native with() support) on TemplateMail for passing variables directly to the Blade view, separate from the token replacement system. Useful for view-only data that doesn't need to flow through the token engine (#10, thanks @agencetwogether)null if not set, so existing templates are unaffected. The TemplateMail mailable also gains an overrideReplyTo() setter for runtime overrides (#9, thanks @agencetwogether)add_reply_to_on_email_templates_table). Run php artisan migrate after upgrading.fin-mail.php config instead of hardcoded defaults, fixing issues with foreign key references when table names are customized (#7, thanks @agencetwogether)FinMailPlugin::make()->customBlocks([...]). Custom blocks now render correctly in the editor, preview mode, and sent emails. ButtonBlock is always included by default. Closes #6EmailTemplate, TipTapConverter, and DefaultEditor now reads from a dynamic plugin-level registry instead of a hardcoded listdate_format and datetime_format config options, supporting a single string or a per-locale array. When null, Filament's defaults apply. Includes FinMail::dateFormat() and FinMail::dateTimeFormat() facade helpersconfig.* and user.*), pre-filled with example values from the token schemaTextEntry, ViewEntry, and badge components[@property](https://github.com/property) annotations on SentEmail model for PHPStanEmailSender, so they appear in the sent emails logversioning.preview, sent.preview.*, settings.sections.add_additional_senders, and settings.sections.add_footer_links across all 58 non-en/fr languagesconfig/fin-mail.phpSentEmailInfolist schema instead of a blade view<details> tagsphp artisan fin-mail:upgrade command to migrate existing data after package updates (supports --dry-run)Str::limit(), causing a TypeError<a> tags in seeded templates (Password Reset, Verify Email) were stripped by TipTap due to font-weight: 600 conflicting with the link mark; buttons now use the native customBlock format<div data-type="customBlock"> were not converted to visible HTML in the View page preview and Compose page previewblocks and versioning translation keys for all 59 supported languagesrenderCustomBlocks() is now public for use by preview componentscreatedBy to prevent lazy loading violationsIf you have existing seeded templates with buttons (Password Reset, Verify Email), run the upgrade command to convert them to the new format:
php artisan fin-mail:upgrade
You can preview what would change first with --dry-run:
php artisan fin-mail:upgrade --dry-run
<style> blocks{{ token }} text in preview and sent emailsTemplateMail mailable that loads content from the database, no need for per-template Mailable classes{{ user.name }}), config values ({{ config.app.name }}), conditionals ({% if user.is_premium %}), and fallbacks ({{ user.name | 'Customer' }})spatie/laravel-translatable, all locales stored in a single recordEditorContractSendEmailAction and SentEmailsRelationManager drop into any Filament resourceEmailSending, EmailSent, EmailFailed, and TemplateUpdated events for application-level hooksHow can I help you explore Laravel packages today?