Ask A Question

Notifications

You’re not receiving notifications from this thread.

Testing Emails in Development with Mailcatcher Discussion

Any good reason why I might use this instead of letter_opener gem?

Reply
Alex Musayev Alex Musayev

I've recently discovered another tool to catch emails: https://github.com/mailhog/... It is implemented in Go, and could be installed via Homebrew on macOS. Can't say if it is better than MailCatcher in any way :)

Reply

I wrote some time ago a gem https://github.com/markets/... to test/preview emails. The approach is totally different: you should prepare data for emails in a config file but then you can easily navigate, in your browser, through all your emails without the need of sending them.

Reply

Very cool. Like the built-in Rails mailer previews but with a UI. http://guides.rubyonrails.o...

Reply

Another option I like is mailtrap.io, which has a free plan for 1 inbox. I like it because it shows HTML, HTML source, text, and raw output, plus spam analysis and html validation.

Reply

Thank you so much!
You just saved my bacon with this gem! I didn't even know it existed..!

Reply

Really Nice Video!
But I have a question: Is it 100 % sure that mailcatcher won't send real emails (to real user)?

Reply

Yep, you'd have to configure an SMTP server to send real emails.

Reply

I'd like to point to my docker image, which is maintained.
It now runs mailcatcher 0.8.2 and is built using Alpine Linux making it one of the smallest available images.
You can find it here https://hub.docker.com/r/stpaquet/alpinemailcatcher

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 80,973+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.