From 20a3986a7edd733f37a091193686776c75e94063 Mon Sep 17 00:00:00 2001 From: Adrian Hinz Date: Sun, 22 Apr 2018 02:22:04 +0200 Subject: [PATCH] added shop name to mail header --- app/mailers/order_mailer.rb | 5 +++++ 1 file changed, 5 insertions(+) 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