5
3
mirror of https://github.com/tildeverse/lobsters synced 2024-06-15 21:36:41 +00:00
tilde.news/app/mailers/ban_notification.rb
2018-03-17 14:05:32 -05:00

16 lines
461 B
Ruby

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}>",
:to => user.email,
:subject => "[#{Rails.application.name}] You have been banned"
)
end
end