. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ namespace Espo\Services; use Espo\Core\Exceptions\Error; use Espo\Core\Mail\Account\PersonalAccount\AccountFactory; use Espo\Core\Mail\Exceptions\NoSmtp; use Espo\Entities\EmailAccount as EmailAccountEntity; /** * @extends Record */ class EmailAccount extends Record { /** * @return ?array * @throws Error * @throws NoSmtp * @internal Left for bc. * @deprecated As of v7.3. Use Espo\Core\Mail\Account\PersonalAccount. * @todo Remove in v9.0. */ public function getSmtpParamsFromAccount(EmailAccountEntity $emailAccount): ?array { $params = $this->injectableFactory ->create(AccountFactory::class) ->create($emailAccount->getId()) ->getSmtpParams(); if (!$params) { return null; } return $params->toArray(); } }