Sha256: ef101df7b01ac0ed0ed19d8af1e2b25c30f7bc03af127327abc1ec703d9b70aa

Contents?: true

Size: 1.1 KB

Versions: 29

Compression:

Stored size: 1.1 KB

Contents

module CabooseStore
  class OrdersMailer < ActionMailer::Base
    default :from => 'woodsnwater.actionmailer@gmail.com'
    
    # Sends a confirmation email to the customer about a new order 
    def customer_new_order(order)
      @order = order
      mail(:to => order.customer ? order.customer.email : order.email, :subject => 'Thank you for your order!')
    end
    
    # Sends a notification email to the fulfillment dept about a new order 
    def fulfillment_new_order(order)
      @order = order
      mail(:to => CabooseStore::fulfillment_email, :subject => 'New Order')
    end
    
    # Sends a notification email to the shipping dept that an order is ready to be shipped
    def shipping_order_ready(order)
      @order = order
      mail(:to => CabooseStore::shipping_email, :subject => 'Order ready for shipping')
    end
    
    # Sends a notification email to the customer that the status of the order has been changed
    def customer_status_updated(order)
      @order = order
      mail(:to => order.customer ? order.customer.email : order.email, :subject => 'Order status update')
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
caboose-store-0.0.39 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.38 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.37 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.36 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.35 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.34 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.33 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.32 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.31 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.30 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.29 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.28 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.27 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.26 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.25 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.24 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.23 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.22 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.21 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.20 app/mailers/caboose_store/orders_mailer.rb