From aff5cd8d44b52fefa937d2573702df346489c166 Mon Sep 17 00:00:00 2001 From: drummer83 Date: Sat, 15 Feb 2025 13:31:35 +0100 Subject: [PATCH] Add 'reply to' email address to payment emails --- app/mailers/payment_mailer.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/mailers/payment_mailer.rb b/app/mailers/payment_mailer.rb index 97db37e053..0bd1ec6532 100644 --- a/app/mailers/payment_mailer.rb +++ b/app/mailers/payment_mailer.rb @@ -17,12 +17,14 @@ class PaymentMailer < ApplicationMailer def authorization_required(payment) @payment = payment - shop_owner = @payment.order.distributor.owner + @order = @payment.order + shop_owner = @order.distributor.owner subject = I18n.t('spree.payment_mailer.authorization_required.subject', - order: @payment.order) + order: @order) I18n.with_locale valid_locale(shop_owner) do mail(to: shop_owner.email, - subject:) + subject:, + reply_to: @order.email) end end end