From 5d79d8520fd606ce63271d6def48765be6d94b77 Mon Sep 17 00:00:00 2001 From: yuri Date: Thu, 20 Oct 2016 15:04:26 +0300 Subject: [PATCH] email: show group email account if email address matches --- application/Espo/Repositories/Email.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/Espo/Repositories/Email.php b/application/Espo/Repositories/Email.php index 4f6cf87521..34d80259fd 100644 --- a/application/Espo/Repositories/Email.php +++ b/application/Espo/Repositories/Email.php @@ -149,6 +149,9 @@ class Email extends \Espo\Core\ORM\Repositories\RDB $idHash = (object) []; foreach ($addressList as $address) { $p = $this->getEntityManager()->getRepository('EmailAddress')->getEntityByAddress($address); + if (!$p) { + $p = $this->getEntityManager()->getRepository('InboundEmail')->where(array('emailAddress' => $address))->findOne(); + } if ($p) { $nameHash->$address = $p->get('name'); $typeHash->$address = $p->getEntityName();