From 4a4de6eba6c92ada0cabf9372bea207e08509ae8 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 13 Aug 2021 10:52:39 +0200 Subject: [PATCH] Take all addresses in the mail header when integrating mail to another app, e.g. Calendar. --- mail/inc/class.mail_integration.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mail/inc/class.mail_integration.inc.php b/mail/inc/class.mail_integration.inc.php index 00ee1b500f..14e927b82d 100644 --- a/mail/inc/class.mail_integration.inc.php +++ b/mail/inc/class.mail_integration.inc.php @@ -326,6 +326,11 @@ class mail_integration { } } + //consider all addresses in the header + foreach (['TO','CC','BCC', 'FROM'] as $h) + { + $mailcontent['mailaddress'] .= ','.$headers[$h]; + } // Convert addresses to email and personal $addresses = imap_rfc822_parse_adrlist($mailcontent['mailaddress'],''); foreach ($addresses as $address)