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.