journalduhacker/app/mailers/ban_notification.rb

17 lines
471 B
Ruby
Raw Normal View History

2014-01-12 22:09:32 +01:00
class BanNotification < ActionMailer::Base
default :from => "#{Rails.application.name} " <<
"<nobody@#{Rails.application.domain}>"
def notify(user, banner, reason)
@banner = banner
@reason = reason
mail(
:from => "#{@banner.username} <nobody@#{Rails.application.domain}>",
:replyto => "#{@banner.username} <#{@banner.email}>",
2014-01-12 22:09:32 +01:00
:to => user.email,
:subject => "[#{Rails.application.name}] You have been banned"
)
end
end