Class: Decidim::BlockUserMailer

Inherits:
ApplicationMailer show all
Defined in:
decidim-core/app/mailers/decidim/block_user_mailer.rb

Overview

A custom mailer for Decidim so we can notify users when their account was blocked

Instance Method Summary collapse

Instance Method Details

#notify(user, justification) ⇒ Object


7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'decidim-core/app/mailers/decidim/block_user_mailer.rb', line 7

def notify(user, justification)
  @user = user
  @organization = user.organization
  @justification = justification
  mail(
    to: user.email,
    subject: I18n.t(
      "decidim.block_user_mailer.notify.subject",
      organization_name: @organization.name,
      justification: @justification
    )
  )
end