Class: Spree::CartonMailer
- Inherits:
-
BaseMailer
- Object
- ActionMailer::Base
- BaseMailer
- Spree::CartonMailer
- Defined in:
- app/mailers/spree/carton_mailer.rb
Instance Method Summary collapse
-
#shipped_email(carton_id, resend: false) ⇒ Object
Send an email to customers to notify that an individual carton has been shipped.
Methods inherited from BaseMailer
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 |