Skip to content

Instantly share code, notes, and snippets.

@rodde177
Forked from pitpit/mailcatcher-install.md
Created September 20, 2016 14:19
Show Gist options
  • Save rodde177/8486da522c287e21989411a951955bb1 to your computer and use it in GitHub Desktop.
Save rodde177/8486da522c287e21989411a951955bb1 to your computer and use it in GitHub Desktop.
Install Mailcatcher on OSX

Install MailCatcher (https://rubygems.org/gems/mailcatcher/versions/0.5.12)

brew install ruby
sudo gem install mailcatcher

Then set it a daemon: https://gist.github.com/sj26/1638617

To setup PHP: edit php.ini (on OSX brew, /usr/local/etc/php/5.5/conf.d/mailcatcher.ini and paste the following configuration:

sendmail_path = /usr/bin/env catchmail -f [email protected]

put any email you want instead of [email protected]

If you got a `require': cannot load such file -- i18n/core_ext/string/interpolate (LoadError) exception:

sudo gem uninstall i18n
sudo gem install i18n -v 0.6.11
sudo gem install interpolate

(see sj26/mailcatcher#155)

Visit the mailcatcher backend : http://localhost:1080

To test it:

php -r "mail('[email protected]', 'test', 'test');"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment