added email to order and added reply_to client email

This commit is contained in:
Adrian Hinz 2018-04-23 14:40:10 +02:00
parent ae3f5bfb8c
commit 7dd55dd28c
3 changed files with 4 additions and 1 deletions

View File

@ -17,7 +17,8 @@ class OrderMailer < ApplicationMailer
sleep(5)
mail(subject: "Nowe zamówienie nr: #{@order.beauty_id}",
from: "#{ss.shop_name} <kaktusiarnia.rumia@gmail.com>",
to: ss.shop_owners_emails)
to: ss.shop_owners_emails,
reply_to: @order.email)
end
def status_change(order)

View File

@ -80,6 +80,7 @@
<tr>
<td style="padding:0.5em 0 0.5em 0.5em; background-color:#EBECEE;">
<span style="color:#0cd4d2; font-weight:bold;"><%= @order.full_name %></span><br>
<span style="color:#0cd4d2; font-weight:bold;"><%= @order.email %></span><br>
<%= raw @order.address.gsub(/(\r\n|\n\r|\r|\n)/, '<br \>') %>
</td>
</tr>

View File

@ -20,6 +20,7 @@ order_arr << [{:value => 'Razem do zapłaty', :colspan => 3, :align => :right},
Adres dostawy
<%= @order.full_name %>
<%= @order.email %>
<%= @order.address %>