SP\Config::setCacheConfigValue('mail_enabled', true); SP\Config::setCacheConfigValue('mail_requestsenabled', $mailRequests); SP\Config::setCacheConfigValue('mail_server', $mailServer); SP\Config::setCacheConfigValue('mail_port', $mailPort); SP\Config::setCacheConfigValue('mail_security', $mailSecurity); SP\Config::setCacheConfigValue('mail_from', $mailFrom); 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) {