Class: Comee::Core::NotificationMailer

Inherits:
ApplicationMailer show all
Defined in:
app/mailers/comee/core/notification_mailer.rb

Instance Method Summary collapse

Instance Method Details

#notifyObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/mailers/comee/core/notification_mailer.rb', line 4

def notify
  user = params[:user]
  files = params[:files]
  files&.each { |k, v| attachments[k] = v }

  mail(
    from: email_address_with_name(user.email, user.name),
    to: params[:recipients],
    subject: params[:subject],
    delivery_method_options: user.delivery_options
  ) do |format|
    format.html { render(html: params[:email_body].html_safe) }
  end
end