Class: Spree::OrderMailer

Inherits:
BaseMailer
  • Object
show all
Defined in:
app/mailers/spree/order_mailer.rb

Instance Method Summary collapse

Methods inherited from BaseMailer

#bcc_address, #from_address, #mail, #money

Instance Method Details

#cancel_email(order, resend = false) ⇒ Object



13
14
15
16
17
18
19
# File 'app/mailers/spree/order_mailer.rb', line 13

def cancel_email(order, resend = false)
  @order = order
  @store = @order.store
  subject = build_subject(t('.subject'), resend)

  mail(to: @order.email, from: from_address(@store), subject:)
end

#confirm_email(order, resend = false) ⇒ Object



5
6
7
8
9
10
11
# File 'app/mailers/spree/order_mailer.rb', line 5

def confirm_email(order, resend = false)
  @order = order
  @store = @order.store
  subject = build_subject(t('.subject'), resend)

  mail(to: @order.email, bcc: bcc_address(@store), from: from_address(@store), subject:)
end

#inventory_cancellation_email(order, inventory_units, resend = false) ⇒ Object



21
22
23
24
25
26
27
# File 'app/mailers/spree/order_mailer.rb', line 21

def inventory_cancellation_email(order, inventory_units, resend = false)
  @order, @inventory_units = order, inventory_units
  @store = @order.store
  subject = build_subject(t('spree.order_mailer.inventory_cancellation.subject'), resend)

  mail(to: @order.email, from: from_address(@store), subject:)
end