*/ public static function getActiveMailerConfig(): array { $fileCfg = Config::get('Mailer'); if (!is_array($fileCfg)) { $fileCfg = []; } unset($fileCfg['addr'], $fileCfg['pass']); try { $row = (new self())->order('id', 'asc')->find(); } catch (\Throwable $e) { $row = null; } if (!$row) { return $fileCfg; } $addr = trim((string)($row['email_addr'] ?? '')); $pass = trim((string)($row['email_pass'] ?? '')); if ($addr === '' || $pass === '') { return $fileCfg; } $fileCfg['addr'] = $addr; $fileCfg['pass'] = $pass; return $fileCfg; } }