Class: Decidim::Meetings::RegistrationMailer

Inherits:
ApplicationMailer
  • Object
show all
Includes:
ActionView::Helpers::SanitizeHelper, ApplicationHelper, TranslationsHelper
Defined in:
app/mailers/decidim/meetings/registration_mailer.rb

Overview

A custom mailer for sending notifications to users when they join a meeting.

Instance Method Summary collapse

Instance Method Details

#confirmation(user, meeting, registration) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'app/mailers/decidim/meetings/registration_mailer.rb', line 16

def confirmation(user, meeting, registration)
  with_user(user) do
    @user = user
    @meeting = meeting
    @registration = registration
    @organization = @meeting.organization
    @locator = Decidim::ResourceLocatorPresenter.new(@meeting)

    add_calendar_attachment

    subject = I18n.t("confirmation.subject", scope: "decidim.meetings.mailer.registration_mailer")
    mail(to: user.email, subject:)
  end
end