Class: Decidim::DummyResources::DummyResourceMailer

Inherits:
ApplicationMailer
  • Object
show all
Defined in:
decidim-dev/app/mailers/decidim/dummy_resources/dummy_resource_mailer.rb

Instance Method Summary collapse

Instance Method Details

#send_email(user, organization, subject, reply_to) ⇒ Object


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'decidim-dev/app/mailers/decidim/dummy_resources/dummy_resource_mailer.rb', line 6

def send_email(user, organization, subject, reply_to)
  @user = user
  @organization = organization

  hash = { to: "#{user.name} <#{user.email}>" }
  hash[:subject] = subject if subject
  hash[:reply_to] = reply_to if reply_to

  mail(
    hash
  ) do |format|
    format.text { "This is the test" }
    format.html { "<p>This is a mail </p>" }
  end
end