Sha256: 3dffe99314f634cfdaea241bb4ed4b59f6f0c9ccee64c2d93147986ea3057417

Contents?: true

Size: 1.52 KB

Versions: 9

Compression:

Stored size: 1.52 KB

Contents

module CabooseStore
  class OrdersMailer < ActionMailer::Base
    default :from => "orders@tuskwearcollection.com"
    
    # Sends a confirmation email to the customer about a new order 
    def customer_new_order(order)
      @order = order
      mail(:to => order.customer.email, :subject => "Thank you from TuskWear!")
    end
    
    # Sends a notification email to the fulfillment dept about a new order 
    def fulfillment_new_order(order)
      @order = order
      #config = YAML::load(File.open("#{Rails.root}/config/tuskwear.yml"))
      #fulfillment_email = config[Rails.env]['order_fulfillment_email']  
      #mail(:to => fulfillment_email, :subject => "New Order")
      mail(:to => 'info@tuskwearcollection.com', :subject => "New Order")
      #mail(:to => 'william@nine.is', :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
      #config = YAML::load(File.open("#{Rails.root}/config/tuskwear.yml"))
      #shipping_email = config[Rails.env]['order_shipping_email']
      #mail(:to => shipping_email, :subject => "Order ready for shipping")
      mail(:to => 'info@tuskwearcollection.com', :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.email, :subject => "TuskWear Order Status Update")
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
caboose-store-0.0.10 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.9 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.8 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.7 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.6 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.5 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.4 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.3 app/mailers/caboose_store/orders_mailer.rb
caboose-store-0.0.2 app/mailers/caboose_store/orders_mailer.rb