diff --git a/application/Espo/Core/Mail/Importer.php b/application/Espo/Core/Mail/Importer.php index f13e0439d9..af1e5407da 100644 --- a/application/Espo/Core/Mail/Importer.php +++ b/application/Espo/Core/Mail/Importer.php @@ -233,6 +233,7 @@ class Importer $reference = str_replace(array('/', '@'), " ", trim($reference, '<>')); $parentType = $parentId = null; $emailSent = PHP_INT_MAX; + $number = null; $n = sscanf($reference, '%s %s %d %d espo', $parentType, $parentId, $emailSent, $number); if ($n == 4 && $emailSent < time()) { if (!empty($parentType) && !empty($parentId)) { diff --git a/application/Espo/Repositories/Email.php b/application/Espo/Repositories/Email.php index 802cea9986..c437a2e919 100644 --- a/application/Espo/Repositories/Email.php +++ b/application/Espo/Repositories/Email.php @@ -45,7 +45,7 @@ class Email extends \Espo\Core\ORM\Repositories\RDB return; } - $eaRepositoty = $this->getEntityManager()->getRepository('EmailAddress'); + $eaRepository = $this->getEntityManager()->getRepository('EmailAddress'); $address = $entity->get($type); $idList = []; @@ -54,7 +54,7 @@ class Email extends \Espo\Core\ORM\Repositories\RDB return trim($e); }, explode(';', $address)); - $idList = $eaRepositoty->getIdListFormAddressList($arr); + $idList = $eaRepository->getIdListFormAddressList($arr); foreach ($idList as $id) { $this->addUserByEmailAddressId($entity, $id, $addAssignedUser); } @@ -124,7 +124,7 @@ class Email extends \Espo\Core\ORM\Repositories\RDB protected function beforeSave(Entity $entity, array $options = array()) { - $eaRepositoty = $this->getEntityManager()->getRepository('EmailAddress'); + $eaRepository = $this->getEntityManager()->getRepository('EmailAddress'); if ($entity->has('attachmentsIds')) { $attachmentsIds = $entity->get('attachmentsIds'); @@ -141,7 +141,7 @@ class Email extends \Espo\Core\ORM\Repositories\RDB if ($entity->has('from')) { $from = trim($entity->get('from')); if (!empty($from)) { - $ids = $eaRepositoty->getIds(array($from)); + $ids = $eaRepository->getIds(array($from)); if (!empty($ids)) { $entity->set('fromEmailAddressId', $ids[0]); $this->addUserByEmailAddressId($entity, $ids[0], true);