Class: ExpressMailer::Mailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/express_mailer/mailer.rb

Instance Method Summary collapse

Instance Method Details

#express(attributes, style = :info) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'app/mailers/express_mailer/mailer.rb', line 7

def express(attributes, style = :info)
  @config = ExpressMailer.configuration
  @attributes = ExpressMailer::Attributes.new(attributes.merge(style: style))

  mail({
    to: @attributes.to,
    from: @attributes.from,
    reply_to: @attributes.reply_to,
    subject: @attributes.subject
  })
end