class BanNotification < ActionMailer::Base default :from => "#{Rails.application.name} " << "" def notify(user, banner, reason) @banner = banner @reason = reason mail( :from => "#{@banner.username} ", :replyto => "#{@banner.username} <#{@banner.email}>", :to => user.email, :subject => "[#{Rails.application.name}] You have been banned" ) end end