Skip to content

EspoCRM – Open Source CRM Application

Ref

Yuriifb9675f47473
diff --git a/application/Espo/Tools/Email/SendService.php b/application/Espo/Tools/Email/SendService.php
index e39850f271..eec71fc9a8 100644
--- a/application/Espo/Tools/Email/SendService.php
+++ b/application/Espo/Tools/Email/SendService.php
@@ -425,8 +425,7 @@ class SendService
throw new NotFound("User not found.");
}
- /** @var Email $email */
- $email = $this->entityManager->getNewEntity(Email::ENTITY_TYPE);
+ $email = $this->entityManager->getRDBRepositoryByClass(Email::class)->getNew();
$email
->setSubject('EspoCRM: Test Email')