aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_mailbox/mail_ext
diff options
context:
space:
mode:
Diffstat (limited to 'lib/action_mailbox/mail_ext')
-rw-r--r--lib/action_mailbox/mail_ext/addresses.rb6
-rw-r--r--lib/action_mailbox/mail_ext/recipients.rb2
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/action_mailbox/mail_ext/addresses.rb b/lib/action_mailbox/mail_ext/addresses.rb
index 8059ce0027..f64c3ef5df 100644
--- a/lib/action_mailbox/mail_ext/addresses.rb
+++ b/lib/action_mailbox/mail_ext/addresses.rb
@@ -4,7 +4,7 @@ class Mail::Message
end
def recipients_addresses
- to_addresses + cc_addresses + bcc_addresses
+ to_addresses + cc_addresses + bcc_addresses + x_original_to_addresses
end
def to_addresses
@@ -18,4 +18,8 @@ class Mail::Message
def bcc_addresses
Array(header[:bcc]&.address_list&.addresses)
end
+
+ def x_original_to_addresses
+ Array(header[:x_original_to]).collect { |header| Mail::Address.new header.to_s }
+ end
end
diff --git a/lib/action_mailbox/mail_ext/recipients.rb b/lib/action_mailbox/mail_ext/recipients.rb
index 58561c7f01..87255ce6ce 100644
--- a/lib/action_mailbox/mail_ext/recipients.rb
+++ b/lib/action_mailbox/mail_ext/recipients.rb
@@ -1,5 +1,5 @@
class Mail::Message
def recipients
- Array(to) + Array(cc) + Array(bcc)
+ Array(to) + Array(cc) + Array(bcc) + Array(header[:x_original_to]).map(&:to_s)
end
end