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)