Email Previews

Jets supports previewing emails from localhost:8888/jets/mailers. This can be enabled with:


Jets.application.configure do
  config.action_mailer.show_previews = true # default: false

Previewing Emails

Here’s an example showing how to use email previews.

jets new demo
cd demo
jets generate migration create_users name:string
jets db:migrate
jets generate mailer UserMailer new_user

Then create a preview model with a naming convention in the app/previews folder like so.


class UserMailerPreview < ActionMailer::Preview
  def new_user

To see the email preview visit: localhost:8888/jets/mailers/user_mailer/new_user. You should see something like this:

Pro tip: Use the <- and -> arrow keys to move back and forward.

Edit this page

See a typo or an error? You can improve this page. This website is available on GitHub, and contributions are encouraged and welcomed. We love pull requests from you!