MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface.
mailcatcherインストール
Gemfile
# Gemfile:
group :development, :test do
gem 'mailcatcher'
end
config/environments/development.rb:
# config/environments/development.rb:
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { :address => 'localhost', :port => 1025 }
インストール
$ vagrant ssh
$ cd /your/project
$ bundle install
mailcatcher起動
$ vagrant ssh
$ cd /your/project
$ bundle exec mailcatcher --http-ip 192.168.33.10
ブラウザでhttp://192.168.33.10:1080
にアクセスします
(iptablesなどで1080番を閉じている場合は、解放してください)