Class: Decidim::UserReportMailer

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

Overview

A custom mailer to notify Decidim users that they have been reported

Instance Method Summary collapse

Instance Method Details

#notify(admin, token, reason, user) ⇒ Object


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

def notify(admin, token, reason, user)
  @user = user
  @organization = user.organization
  @token = token
  @reason = reason
  @admin = admin
  mail(to: admin.email, subject: I18n.t(
    "decidim.user_report_mailer.notify.subject",
    organization_name: @organization.name,
    reason: @reason,
    token: @token
  ))
end