'Email invalide'], 400); exit; } $outboxDir = $root . '/storage/outbox'; if (!is_dir($outboxDir)) { @mkdir($outboxDir, 0775, true); } $id = date('Ymd_His') . '_' . bin2hex(random_bytes(4)); $meta = [ 'id' => $id, 'type' => 'notify_interest', 'tool' => $tool, 'email' => $email, 'created_at' => date(DATE_ATOM), ]; file_put_contents( $outboxDir . DIRECTORY_SEPARATOR . $id . '_notify.json', json_encode($meta, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT) ); Http::json(['status' => 'ok']);