Use case class UserMailer < ActionMailer::Base default from: "railscasts@example.com" def signup_confirmation(user) mail to: @user.email, subject: "Sign Up Confirmation" # ... end end class UsersController < ApplicationController def create @user = User.new(params[:user]) @user.save UserMailer.signup_confirmation(@user).deliver redirect_to @user, notice: "Signed up successfully." end end 今日初めてActi