From 95149b2e893b6787e7a0afd8031d1651b38730df Mon Sep 17 00:00:00 2001 From: Bruno Prieto Date: Thu, 30 Nov 2023 02:19:30 -0300 Subject: [PATCH] Only includes one mail in reply_to --- lib/mailchannels_worker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mailchannels_worker.rb b/lib/mailchannels_worker.rb index 036dc26..935ca0c 100644 --- a/lib/mailchannels_worker.rb +++ b/lib/mailchannels_worker.rb @@ -29,7 +29,7 @@ def deliver!(mail) to: mail.to_addresses.map { |address| { email: address.address, name: address.name }.compact }, cc: mail.cc_addresses.map { |address| { email: address.address, name: address.name }.compact }.presence, bcc: mail.bcc_addresses.map { |address| { email: address.address, name: address.name }.compact }.presence, - reply_to: (mail.header["Reply-To"]&.element&.addresses || []).map { |address| { email: address.address, name: address.name }.compact }.presence + reply_to: (mail.header["Reply-To"]&.element&.addresses || []).map { |address| { email: address.address, name: address.name }.compact }.first }.compact], content: mail.parts.map { |part| { type: part.content_type, value: part.decoded } } }