diff --git a/app/mailers/payment_mailer.rb b/app/mailers/payment_mailer.rb index 97db37e053..f9819d252a 100644 --- a/app/mailers/payment_mailer.rb +++ b/app/mailers/payment_mailer.rb @@ -16,13 +16,14 @@ class PaymentMailer < ApplicationMailer end 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 diff --git a/app/mailers/spree/order_mailer.rb b/app/mailers/spree/order_mailer.rb index e4d886d3e9..b396e79283 100644 --- a/app/mailers/spree/order_mailer.rb +++ b/app/mailers/spree/order_mailer.rb @@ -23,7 +23,8 @@ module Spree I18n.with_locale valid_locale(@order.distributor.owner) do subject = I18n.t('spree.order_mailer.cancel_email_for_shop.subject') mail(to: @order.distributor.contact.email, - subject:) + subject:, + reply_to: @order.email) end end @@ -43,7 +44,8 @@ module Spree I18n.with_locale valid_locale(@order.user) do subject = mail_subject(t('spree.order_mailer.confirm_email.subject'), resend) mail(to: @order.distributor.contact.email, - subject:) + subject:, + reply_to: @order.email) end end diff --git a/app/views/payment_mailer/authorization_required.html.haml b/app/views/payment_mailer/authorization_required.html.haml index 080a88de06..391ccbc04a 100644 --- a/app/views/payment_mailer/authorization_required.html.haml +++ b/app/views/payment_mailer/authorization_required.html.haml @@ -1,2 +1,2 @@ -= t('spree.payment_mailer.authorization_required.message', order_number: @payment.order.number) -= link_to spree.edit_admin_order_url(@payment.order), spree.edit_admin_order_url(@payment.order) += t('spree.payment_mailer.authorization_required.message', order_number: @order.number) += link_to spree.edit_admin_order_url(@order), spree.edit_admin_order_url(@order) diff --git a/app/views/payment_mailer/authorization_required.text.haml b/app/views/payment_mailer/authorization_required.text.haml index b084ca2755..c494f054e3 100644 --- a/app/views/payment_mailer/authorization_required.text.haml +++ b/app/views/payment_mailer/authorization_required.text.haml @@ -1,3 +1,3 @@ -= t('spree.payment_mailer.authorization_required.message', order_number: @payment.order.number) += t('spree.payment_mailer.authorization_required.message', order_number: @order.number) -= link_to spree.edit_admin_order_url(@payment.order), spree.edit_admin_order_url(@payment.order) += link_to spree.edit_admin_order_url(@order), spree.edit_admin_order_url(@order)