2014-05-22 rails4.1でメールのプレビュー Ruby On Rails rails4.1からメールのプレビュー機能ができたと聞いて、使ってみた! まず下準備 rails g mailer user_mailer /app/mailers/user_mailer.rb class UserMailer < ActionMailer::Base default from: "from@example.com" def welcome @to = "to@test.com" @from = "from@test.com" @subject = "hoge" mail(:subject => @subject, :to => @to, :from => @from) end end /app/views/user_mailer/welcome.text.erb テストメールだぉ メ
![rails4.1でメールのプレビュー - 惰眠と論理と指揮棒と](https://cdn-ak-scissors.b.st-hatena.com/image/square/776b6e5686d29e8c894b4c2f2ba5da4f36682e6c/height=288;version=1;width=512/http%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2FL%2FLogicTkt%2F20140522%2F20140522212834.jpg)