My preferred way to capture and view emails being sent by a Rails app in development is to use Mailpit. It runs a local SMTP server at port 1025 and a barebones email client at port 8025. I used to use MailHog but development has stalled. Mailpit has the same ease of use while supporting newer features and looking nicer.
The mailpit utility can be installed with brew:
brew install mailpit
brew services start mailpit
The development smtp settings are configured in config/environments/development.rb:
My preferred way to capture and view emails being sent by a Rails app in development is to use Mailpit. It runs a local SMTP server at port
1025
and a barebones email client at port8025
. I used to use MailHog but development has stalled. Mailpit has the same ease of use while supporting newer features and looking nicer.The
mailpit
utility can be installed withbrew
:The development
smtp
settings are configured inconfig/environments/development.rb
:All outgoing email from the development server will be captured and viewable in both
html
andtext
form atlocalhost:8025
.Source: https://github.com/jbranchaud/til/blob/master/rails/capture-development-emails-with-mailhog.md