Interface for browsing sent emails.
Add this line to your application's Gemfile:
gem 'malina', group: :development
And then execute:
$ bundle
Or install it yourself as:
$ gem install malina
rails g malina:install
it generates malina_emails.rb
in your application's folder config/initializers/
ActionMailer::Base.register_interceptor(Malina::EmailInterceptor) if Rails.env.development?
Malina::Config.layout = 'malina'
rails g malina:migration
run migration
rails db:migrate
add this line to your config/routes.rb
mount Malina::Engine => '/backroom/emails', as: :malina
you can change this url of course
and now interface is available at your's app url, for example localhost:3000/backroom/emails
Since Malina is an engine, all its views are packaged inside the gem. These views will help you get started, but after some time you may want to change them. If this is the case, you just need to invoke the following generator, and it will copy all views to your application:
rails g malina:layout
makes Layout available for changes
rails g malina:views
the other views, too
Bug reports and pull requests are welcome on GitHub at https://github.com/mpakus/malina
The gem is available as open source under the terms of the MIT License.