diff --git a/application/Espo/Services/Email.php b/application/Espo/Services/Email.php index 3d7349d7d1..f2cbeacf30 100644 --- a/application/Espo/Services/Email.php +++ b/application/Espo/Services/Email.php @@ -180,7 +180,7 @@ class Email extends Record if ($user && in_array($fromAddress, $userAddressList)) { $primaryUserAddress = strtolower($user->get('emailAddress')); if ($primaryUserAddress === $fromAddress) { - $preferences = $this->getEntityManager()->get('Preferences', $user->id); + $preferences = $this->getEntityManager()->getEntity('Preferences', $user->id); if ($preferences) { $smtpParams = $preferences->getSmtpParams(); if ($smtpParams) {