From 7dd55dd28c81886d11414f847485ac8b6f88cc54 Mon Sep 17 00:00:00 2001 From: Adrian Hinz Date: Mon, 23 Apr 2018 14:40:10 +0200 Subject: [PATCH] added email to order and added reply_to client email --- app/mailers/order_mailer.rb | 3 ++- app/views/order_mailer/new_order_to_shop_owner.html.erb | 1 + app/views/order_mailer/new_order_to_shop_owner.text.erb | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/mailers/order_mailer.rb b/app/mailers/order_mailer.rb index 5819802..2f67aae 100644 --- a/app/mailers/order_mailer.rb +++ b/app/mailers/order_mailer.rb @@ -17,7 +17,8 @@ class OrderMailer < ApplicationMailer sleep(5) mail(subject: "Nowe zamówienie nr: #{@order.beauty_id}", from: "#{ss.shop_name} ", - to: ss.shop_owners_emails) + to: ss.shop_owners_emails, + reply_to: @order.email) end def status_change(order) diff --git a/app/views/order_mailer/new_order_to_shop_owner.html.erb b/app/views/order_mailer/new_order_to_shop_owner.html.erb index 4a8e384..8060c96 100644 --- a/app/views/order_mailer/new_order_to_shop_owner.html.erb +++ b/app/views/order_mailer/new_order_to_shop_owner.html.erb @@ -80,6 +80,7 @@ <%= @order.full_name %>
+ <%= @order.email %>
<%= raw @order.address.gsub(/(\r\n|\n\r|\r|\n)/, '
') %> diff --git a/app/views/order_mailer/new_order_to_shop_owner.text.erb b/app/views/order_mailer/new_order_to_shop_owner.text.erb index 2799266..eebc48f 100644 --- a/app/views/order_mailer/new_order_to_shop_owner.text.erb +++ b/app/views/order_mailer/new_order_to_shop_owner.text.erb @@ -20,6 +20,7 @@ order_arr << [{:value => 'Razem do zapłaty', :colspan => 3, :align => :right}, Adres dostawy <%= @order.full_name %> +<%= @order.email %> <%= @order.address %>