Built-in mail preview UI for dev mode

Hi everyone,
I’ve been working on something and wanted to share it with you before opening a PR :smile: a dev-mode mail preview UI for Meteor :partying_face:

Concept

This adds a simple web UI at /__meteor_mail__ that captures every outgoing email and lets you browse them in your browser with rendered HTML, plain text, HTML source, all the metadata. Zero config, no third-party service, completely absent in production. And of course, emails are still printed to the console, so this is purely additive, it doesn’t change any existing behavior :smile:

In other frameworks

  • Ruby on Rails has had Action Mailer Previews built-in since 4.1 (2014!). Available at /rails/mailers/, zero setup
  • Phoenix/Elixir — Swoosh ships with a local adapter and a built-in mailbox viewer. Part of the default Phoenix stack, works out of the box
  • Laravel lets you render Mailables directly in browser routes, and since v9+ has first-party preview support. The ecosystem also has great tools like Mailpit baked in
  • Django ships a console email backend out of the box; the community fills the visual gap with django-debug-toolbar’s mail panel

Where should it live?

That’s the question I’d genuinely love your input on :grimacing:

Inside the email package:

  • Zero friction — works out of the box, no extra package to add
  • Direct access to Email.hookSend, clean integration
  • What Rails and Phoenix do: preview is part of the mailer itself
  • Minimal footprint (~200 lines, dev-mode only, webapp as a weak dep)

As a separate email-preview package:

  • Keeps the email package focused purely on sending
  • Gives developers the choice

I have a working prototype in both cases, so I’m really open to either direction so what do you think would fit best with the project’s philosophy?




Would love to hear your thoughts! :slightly_smiling_face:

1 Like

I love this idea. Would be extremely useful for my dev workflow.

Edit: I think it is also time to modernize the default email templates. But that would be separate from this.