This commit is contained in:
Yuri Kuznetsov
2024-01-04 16:25:36 +02:00
parent 5833565e10
commit ef8b284434
2 changed files with 5 additions and 15 deletions
@@ -103,11 +103,7 @@ class Service
$imapParams = $account->getImapParams();
if (!$imapParams) {
return null;
}
return $imapParams->getPassword();
return $imapParams?->getPassword();
}
/**
@@ -121,7 +117,7 @@ class Service
$folder = $account->getSentFolder();
if (!$folder) {
throw new Error("No sent folder for Group Email Account {$id}.");
throw new Error("No sent folder for Group Email Account $id.");
}
$storage = $this->storageFactory->create($account);
@@ -29,16 +29,14 @@
namespace Espo\Core\Mail\Account\PersonalAccount;
use Espo\Core\Mail\Account\Account as Account;
use Laminas\Mail\Message;
use Espo\Core\Mail\Account\Account as Account;
use Espo\Core\Exceptions\Forbidden;
use Espo\Core\Exceptions\Error;
use Espo\Core\Mail\Account\Fetcher;
use Espo\Core\Mail\Account\Storage\Params;
use Espo\Core\Mail\Account\StorageFactory;
use Espo\Entities\User;
class Service
@@ -141,11 +139,7 @@ class Service
$imapParams = $account->getImapParams();
if (!$imapParams) {
return null;
}
return $imapParams->getPassword();
return $imapParams?->getPassword();
}
/**
@@ -159,7 +153,7 @@ class Service
$folder = $account->getSentFolder();
if (!$folder) {
throw new Error("No sent folder for Email Account {$id}.");
throw new Error("No sent folder for Email Account $id.");
}
$storage = $this->storageFactory->create($account);