diff --git a/app/mailers/order_mailer.rb b/app/mailers/order_mailer.rb index 5581118..f507371 100644 --- a/app/mailers/order_mailer.rb +++ b/app/mailers/order_mailer.rb @@ -3,7 +3,9 @@ class OrderMailer < ApplicationMailer default to: 'kaktusiarnia@kaktusiarnia.pl' def new_order(order) @order = order + ss = ScSetting.first mail(subject: 'Potwierdzenie złożenia zamówienia na kaktusiarnia.pl', + from: "#{ss.shop_name} ", to: @order.email) end @@ -11,12 +13,15 @@ class OrderMailer < ApplicationMailer @order = order ss = ScSetting.first mail(subject: "Nowe zamówienie nr: #{@order.beauty_id}", + from: "#{ss.shop_name} ", to: ss.shop_owners_emails) end def status_change(order) @order = order + ss = ScSetting.first mail(subject: "Zmiana statusu zamówienia #{@order.beauty_id}", + from: "#{ss.shop_name} ", to: @order.email) end end