Add 'reply to' email address to payment emails

This commit is contained in:
drummer83
2025-02-15 13:31:35 +01:00
committed by Konrad
parent e524b3ddb1
commit aff5cd8d44

View File

@@ -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