Posted by on
MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface. Run mailcatcher, set your favourite app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server, then check out http://127.0.0.1:1080 to see the mail that's arrived so far.
Normally, the command below should work:
$ gem install mailcatcher
But if you are having challenges, try this:
$ gem install mailcatcher -- --with-cflags="-Wno-error=implicit-function-declaration"
At the time of this tutorial, I was testing this one:
$ rvm --version
rvm 1.29.12-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
$ ruby --version
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin19]
To start mailcatcher:
/usr/local/rvm/gems/ruby-2.4.0/gems/thin-1.5.1/lib/thin/server.rb:104: warning: constant ::Fixnum is deprecated
*** MailCatcher runs as a daemon by default. Go to the web interface to quit.
Starting Mail-Catcher On Login
Place me.mailcatcher.plist into ~/Library/LaunchAgents, then run
launchctl load ~/Library/LaunchAgents/me.mailcatcher.plist