Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Nova Mail Editor Laravel Package

statikbe/nova-mail-editor

A Laravel Nova package for editing mail templates directly from your Nova admin panel. Manage transactional email content, customize subject lines and body HTML, and preview changes without touching code—keeping email copy editable for non-technical teams.

View on GitHub
Deep Wiki
Context7

Getting Started

Install the Nova tool and its underlying mail-editor dependency, then publish/run migrations so templates have storage:

composer require statikbe/laravel-nova-mail-editor
php artisan vendor:publish --provider="Statikbe\NovaMailEditor\NovaMailEditorServiceProvider"
php artisan migrate

Register the tool in app/Providers/NovaServiceProvider.php:

public function tools()
{
    return [
        new \Statikbe\NovaMailEditor\NovaMailEditor(),
    ];
}

Look first at:

  • The package README for the exact provider/tool class names and config keys.
  • Published config and migrations to understand how templates are stored.
  • Your existing Mailables and notification classes to identify which transactional emails should become Nova-editable.

First use case: move marketing/transactional email copy out of Blade files and into Nova so non-developers can update subject lines and body content without a deploy. Keep the template key stable, render it from a Mailable/notification, and pass the same data variables the Blade template used to receive.

Release 1.1.0 is a minor version bump. The release notes only link to the changelog, so verify the compare diff before upgrading from 1.0.0, but there is no documented breaking change.

Implementation Patterns

Use stable template keys and render them at send time:

Mail::to($user)->send(new TemplateMail(
    templateKey: 'welcome-email',
    data: [
        'user' => $user,
        'loginUrl' => route('login'),
    ],
));

Day-to-day patterns that work well:

  • Seed defaults, edit in Nova. Keep a seeder or migration that creates the initial template records. Nova becomes the editing surface, while source control still has a recoverable baseline.
  • Separate layout from content. Let the package/editor own the wrapper layout where possible, and keep only editable subject/body content in Nova. This prevents users from breaking tracking pixels, unsubscribe links, or responsive wrappers.
  • Preview with realistic data. Maintain sample payloads for each template so previews show actual names, URLs, order numbers, etc. Preview data should mirror the production data contract.
  • Authorize narrowly. Restrict the Nova tool to trusted admin/marketing roles via Nova gates/policies. Email templates are production content and can affect every outgoing transactional message.
  • Validate variables before save. If the package does not enforce required variables, add a save/validation hook or a small test that renders each template with fixture data. Missing variables are the most common day-to-day failure.
  • Use queues for sends. Rendering from the database adds a query/render step. Queue transactional mail and restart workers after deployments that change mail code.
  • Promote templates between environments. Export/import or seed template records rather than manually recreating copy in staging and production. Treat template content as configuration that needs review.
  • Test rendered output. Use Mail::fake() for send assertions and separately render templates to assert subject/body contains expected variables and links.

Extension points to prefer: published config, the package’s template model/service, and documented view overrides. Avoid editing vendor files; if you need custom preview data or a custom editor field, wrap the package behavior in your own Nova tool or service where possible.

Gotchas and Tips

  • Database-backed content is not in Git. Establish an export/seed process early. Otherwise template changes exist only in production and are hard to audit or roll back.
  • Config cache can hide changes. After publishing config or upgrading, run php artisan config:clear / config:cache in the deployment flow.
  • Upgrade from 1.0.0 deliberately. Read the full 1.1.0 compare diff, republish config/views only if needed, run migrations, and smoke-test the Nova tool. A minor release should be non-breaking, but terse release notes are not proof.
  • Missing variables fail silently or loudly depending on rendering. Add fixture-based rendering tests for every template key and validate required variables at save time.
  • Email client rendering is not browser rendering. Nova preview is useful for copy review, not a guarantee of Outlook/Gmail rendering. Keep a real test-send workflow for layout changes.
  • Sanitization and trust boundaries matter. If non-developers can paste HTML, decide whether raw HTML is acceptable. Strip or restrict scripts/unsafe markup if the editor does not already do so.
  • Authorization is not automatic just because it is Nova. Confirm the tool’s routes and policies are protected by Nova’s auth middleware and your gates. Test with a non-admin account.
  • Locale and fallback behavior need explicit testing. If you send multilingual mail, verify what happens when a translation/template is missing.
  • Debugging tip: log the template key, locale, and data keys before rendering, and capture the final subject/body in a local mail driver during development.
  • Queue workers cache code. After deploying mail-rendering changes, restart workers with php artisan queue:restart.

The practical leverage is high: marketers can iterate on copy without deploys, and developers keep a stable rendering contract. The cost is governance—treat templates as production data, test rendering, and keep a promotion/rollback path.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums