Class: Spree::CartonMailer

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

Instance Method Summary collapse

Methods inherited from BaseMailer

#from_address, #mail, #money

Instance Method Details

#shipped_email(carton_id, resend: false) ⇒ Object

Send an email to customers to notify that an individual carton has been shipped.



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

def shipped_email(carton_id, resend: false)
  @carton = Spree::Carton.find(carton_id)
  subject = (resend ? "[#{Spree.t(:resend).upcase}] " : '')
  subject += "#{Spree::Store.current.name} #{Spree.t('shipment_mailer.shipped_email.subject')} ##{@carton.order_numbers.join(', ')}"
  mail(to: @carton.order_emails, from: from_address(Spree::Store.current), subject: subject)
end