This blog is part of our Rails 5 series.

We can now skip requiring Action Mailer while generating Rails 5 app.

$ rails new my_app --skip-action-mailer # OR $ rails new my_app -M

This comments out requiring action_mailer/railtie in application.rb .

It also omits mailer specific configurations such as config.action_mailer.raise_delivery_errors and config.action_mailer.perform_caching in production/development and config.action_mailer.delivery_method by default in test environment.

# application.rb require "rails" require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "action_controller/railtie" # require "action_mailer/railtie" require "action_view/railtie" require "action_cable/engine" require "sprockets/railtie" require "rails/test_unit/railtie"