News

Statamic Mailables Viewer Previews Laravel Emails in the Control Panel

Published
Statamic Mailables Viewer Previews Laravel Emails in the Control Panel image

Mailables Viewer is a new free Statamic add-on from Jack McDade that discovers the Laravel mailables in an application and makes them available under Utilities → Mailables in the Control Panel.

If you're anything like me, you've got a bunch of /preview-email/{email} routes sitting in web.php, commented out until you need them. You know the ones. They new up a WelcomeEmail Laravel mailable with a pile of fake data, dump the HTML, and give you a webpage you can hit while you make your changes.

Or maybe you're even lazier and you just send it to yourself. Again. And again. You're afraid Herd Pro or Mailtrap are starting to judge you. Been there too.

Well, I got tired of that and built Mailables Viewer.

The add-on renders each mailable's HTML without requiring dedicated preview routes or configuration. It generates sample constructor data, lets you edit scalar values while watching the preview and envelope update, and provides desktop, tablet, and mobile views. You can also inspect the subject, sender, attachments, template, queue status, and references to the mailable within the codebase.

Mailables Viewer can copy the rendered HTML or send a test with sendNow(), including mailables that normally use a queue. Objects and arrays remain read-only, while strings, numbers, booleans, and dates can be changed in the data editor. Mailables outside the default app/Mail directory can be registered through the add-on's facade.

Super users receive access automatically, and other roles can be granted the access mailables utility permission. Read McDade's announcement for screenshots and the full walkthrough.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Sponsored

laravelcloud logo
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud

The latest

View all →
UUID Request Input and Migration Failure Events in Laravel 13.42 image

UUID Request Input and Migration Failure Events in Laravel 13.42

Read article
Replay Missed Laravel Scheduled Tasks With Schedule Catchup image

Replay Missed Laravel Scheduled Tasks With Schedule Catchup

Read article
Search Polymorphic Relations and Filament Tables With Laravel Searchable image

Search Polymorphic Relations and Filament Tables With Laravel Searchable

Read article
Laravel Rest Api 3.0: Typed Fields, Metrics, and OpenAPI Docs image

Laravel Rest Api 3.0: Typed Fields, Metrics, and OpenAPI Docs

Read article
Real-Time Inertia Props With Laravel Reverb image

Real-Time Inertia Props With Laravel Reverb

Read article
PhpStorm 2026.3 Adds an Agent Workspace and PHP 8.6 Support image

PhpStorm 2026.3 Adds an Agent Workspace and PHP 8.6 Support

Read article