Class: Decidim::NewslettersOptInMailer

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

Overview

A custom mailer for Decidim so we can notify users to verify their own newsletter notifications settings. GDPR releated

Instance Method Summary collapse

Instance Method Details

#notify(user, token) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'decidim-core/app/mailers/decidim/newsletters_opt_in_mailer.rb', line 7

def notify(user, token)
  with_user(user) do
    @user = user
    @organization = user.organization
    @token = token

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