From e70142fb1757fd31d48927e37c37f5b471bd7bf4 Mon Sep 17 00:00:00 2001 From: drummer83 Date: Tue, 30 Jan 2024 22:02:28 +0100 Subject: [PATCH] Add a 'reply to' email address where it makes sense and has been missing until now --- app/mailers/enterprise_mailer.rb | 3 ++- app/mailers/payment_mailer.rb | 4 +++- app/mailers/spree/order_mailer.rb | 3 ++- app/mailers/spree/shipment_mailer.rb | 4 +++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/mailers/enterprise_mailer.rb b/app/mailers/enterprise_mailer.rb index d33baf3be0..e47291e900 100644 --- a/app/mailers/enterprise_mailer.rb +++ b/app/mailers/enterprise_mailer.rb @@ -24,7 +24,8 @@ class EnterpriseMailer < ApplicationMailer subject = t('.subject', enterprise: @enterprise.name) mail(to: user.email, - subject:) + subject:, + reply_to: @enterprise.contact.email) end end diff --git a/app/mailers/payment_mailer.rb b/app/mailers/payment_mailer.rb index 7481353b94..661f090d0a 100644 --- a/app/mailers/payment_mailer.rb +++ b/app/mailers/payment_mailer.rb @@ -12,7 +12,9 @@ class PaymentMailer < ApplicationMailer subject = t('.subject', number: @order.number, distributor: @order.distributor.name) - mail(to: payment.order.email, subject:) + mail(to: @order.email, + subject:, + reply_to: @order.distributor.contact.email) end end diff --git a/app/mailers/spree/order_mailer.rb b/app/mailers/spree/order_mailer.rb index d628f5a18d..b63bc9d167 100644 --- a/app/mailers/spree/order_mailer.rb +++ b/app/mailers/spree/order_mailer.rb @@ -17,7 +17,8 @@ module Spree number: @order.number, distributor: @order.distributor.name) mail(to: @order.email, - subject:) + subject:, + reply_to: @order.distributor.contact.email) end end diff --git a/app/mailers/spree/shipment_mailer.rb b/app/mailers/spree/shipment_mailer.rb index 8a6f8e38b7..5d1795eb35 100644 --- a/app/mailers/spree/shipment_mailer.rb +++ b/app/mailers/spree/shipment_mailer.rb @@ -12,7 +12,9 @@ module Spree subject = t(base_subject, number: @order.number, distributor: @order.distributor.name) - mail(to: @shipment.order.email, subject:) + mail(to: @shipment.order.email, + subject:, + reply_to: @order.distributor.contact.email) end private