[RAILS] How to use letter_opener_web

at first

Introducing letter_opener_web, which is convenient for sending and receiving emails in the development environment with Ruby on Rails.

Preparation

# Gemfile
group :development do
  gem 'letter_opener_web'
end
# config/routes.rb
Rails.application.routes.draw do
  root to: 'welcome#index'
  # (Abbreviation)

  #Write at the very end for letter opener
  mount LetterOpenerWeb::Engine, at: '/letter_opener' if Rails.env.development?
end
# config/environments/development.rb
Rails.application.configure do
  #Added the following for letter opener
  config.action_mailer.default_url_options = { host: 'localhost:3000' }
  config.action_mailer.perform_caching = true
  config.action_mailer.delivery_method = :letter_opener_web
  config.action_mailer.perform_deliveries = true
end

How to use

Start the server with the following command.

% rails s 

Launch your browser,``` localhost:3000/letter_opener/To access.

Screenshot 0002-12-14 0.11.16.jpg

The email you sent is displayed.

Click View plain text version You can also check the text mail display.

##Finally It was an introduction of a letter opener that is easy to use. If its helpful then im happy.

Recommended Posts

How to use letter_opener_web
How to use Map
How to use with_option
How to use fields_for
How to use java.util.logging
How to use map
How to use collection_select
How to use Twitter4J
How to use active_hash! !!
How to use MapStruct
How to use hidden_field_tag
How to use TreeSet
[How to use label]
How to use identity
How to use hashes
How to use JUnit 5
How to use Dozer.mapper
How to use Gradle
How to use org.immutables
How to use java.util.stream.Collector
How to use VisualVM
How to use Map
How to use Chain API
[Java] How to use Map
How to use Priority Queuing
[Rails] How to use enum
How to use java Optional
How to use JUnit (beginner)
How to use Ruby return
[Rails] How to use enum
How to use @Builder (Lombok)
[Swift] How to use UserDefaults
How to use java class
How to use Swift UIScrollView
How to use Big Decimal
[Java] How to use Optional ②
[Java] How to use removeAll ()
How to use String [] args
[Java] How to use string.format
How to use rails join
How to use Java Map
Ruby: How to use cookies
How to use dependent :: destroy
How to use Eclipse Debug_Shell
How to use Apache POI
[Rails] How to use validation
How to use Java variables
[Rails] How to use authenticate_user!
[Rails] How to use "kaminari"
How to use GC Viewer
[Java] How to use Optional ①
How to use Lombok now
[Creating] How to use JUnit
[Rails] How to use Scope
How to use the link_to method
How to use arrays (personal memorandum)
How to use scope (JSP & Servlet)
How to use the include? method
[Rails] How to use devise (Note)
How to use the form_with method
How to use EventBus3 and ThreadMode