class UserMailer < ActionMailer::Base def reminder(user) @subject = 'Your login information at RailsSpace.com' @body = {} # Give body access to the user information. @body["user"] = user @recipients = user.email @from = 'RailsSpace ' end def message(mail) subject mail[:message].subject from 'RailsSpace ' recipients mail[:recipient].email body mail end end