Merge pull request #13139 from drummer83/reply-to-email-address

Add a 'reply to' email address where it makes sense and has been missing
This commit is contained in:
Filipe
2025-02-21 13:09:42 -06:00
committed by GitHub
4 changed files with 14 additions and 6 deletions

View File

@@ -23,7 +23,8 @@ class EnterpriseMailer < ApplicationMailer
I18n.with_locale valid_locale(@enterprise.owner) do
subject = t('enterprise_mailer.invite_manager.subject', enterprise: @enterprise.name)
mail(to: user.email,
subject:)
subject:,
reply_to: @enterprise.contact.email)
end
end

View File

@@ -5,10 +5,13 @@ class PaymentMailer < ApplicationMailer
def authorize_payment(payment)
@payment = payment
@order = @payment.order
subject = I18n.t('spree.payment_mailer.authorize_payment.subject',
distributor: @payment.order.distributor.name)
I18n.with_locale valid_locale(@payment.order.user) do
mail(to: payment.order.email, subject:)
distributor: @order.distributor.name)
I18n.with_locale valid_locale(@order.user) do
mail(to: @order.email,
subject:,
reply_to: @order.distributor.contact.email)
end
end

View File

@@ -13,7 +13,8 @@ module Spree
@order = find_order(order_or_order_id)
I18n.with_locale valid_locale(@order.user) do
mail(to: @order.email,
subject: mail_subject(t('spree.order_mailer.cancel_email.subject'), resend))
subject: mail_subject(t('spree.order_mailer.cancel_email.subject'), resend),
reply_to: @order.distributor.contact.email)
end
end

View File

@@ -5,8 +5,11 @@ module Spree
def shipped_email(shipment, delivery:)
@shipment = shipment.respond_to?(:id) ? shipment : Spree::Shipment.find(shipment)
@delivery = delivery
@order = @shipment.order
subject = base_subject
mail(to: @shipment.order.email, subject:)
mail(to: @order.email,
subject:,
reply_to: @order.distributor.contact.email)
end
private