if ($mailAuth) { SP\Config::setCacheConfigValue('mail_authenabled', $mailAuth); SP\Config::setCacheConfigValue('mail_user', $mailUser); SP\Config::setCacheConfigValue('mail_pass', $mailPass); } $Log->addDescription(_('Correo habiltado')); } else { SP\Config::setCacheConfigValue('mail_enabled', false); SP\Config::setCacheConfigValue('mail_requestsenabled', false); SP\Config::setCacheConfigValue('mail_authenabled', false); $Log->addDescription(_('Correo deshabilitado')); } $Log->addDescription(sprintf('%s: %s', _('Sección'), _('Correo'))); } try { SP\Config::writeConfig(); } catch (\SP\SPException $e) { $Log->addDescription($e->getMessage()); $Log->addDescription($e->getHint()); $Log->writeLog(); SP\Response::printJSON($e->getMessage()); } $Log->writeLog(); SP\Email::sendEmail($Log); if ($actionId === SP\Controller\ActionsInterface::ACTION_CFG_GENERAL) { // Recargar la aplicación completa para establecer nuevos valores SP\Util::reload(); } SP\Response::printJSON(_('Configuración actualizada'), 0, $doActionOnClose); } elseif ($actionId === SP\Controller\ActionsInterface::ACTION_CFG_ENCRYPTION) { $currentMasterPass = SP\Request::analyzeEncrypted('curMasterPwd');