Class: Decidim::Dev::DummyResourceMailer

Inherits:
ApplicationMailer
  • Object
show all
Defined in:
app/mailers/decidim/dev/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 'app/mailers/decidim/dev/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