setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Stats $stats = ['configs' => 0, 'winners' => 0, 'tests' => 0, 'inbox_rate' => '-', 'seeds' => 0, 'isp' => 0]; try { $stats['configs'] = $pdo->query("SELECT COUNT(*) FROM admin.brain_configs")->fetchColumn() ?: 0; } catch(Exception $e) {} try { $stats['winners'] = $pdo->query("SELECT COUNT(*) FROM admin.brain_winners")->fetchColumn() ?: 0; } catch(Exception $e) {} try { $stats['tests'] = $pdo->query("SELECT COUNT(*) FROM admin.brain_test_results")->fetchColumn() ?: 0; } catch(Exception $e) {} try { $stats['seeds'] = $pdo->query("SELECT COUNT(*) FROM admin.brain_seeds")->fetchColumn() ?: 0; } catch(Exception $e) {} try { $stats['isp'] = $pdo->query("SELECT COUNT(*) FROM admin.isp_profiles")->fetchColumn() ?: 0; } catch(Exception $e) {} try { $avg = $pdo->query("SELECT AVG(inbox_rate) FROM admin.brain_configs WHERE inbox_rate > 0")->fetchColumn(); if ($avg) $stats['inbox_rate'] = round($avg, 1) . '%'; } catch(Exception $e) {} // Action handlers $message = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $action = $_POST['action'] ?? ''; if ($action === 'create_config') { $isp_target = $_POST['isp_target'] ?? 'GMAIL'; $method = $_POST['send_method'] ?? 'OFFICE_365'; $from_name = $_POST['from_name'] ?? ''; $from_email = $_POST['from_email'] ?? ''; $subject_template = $_POST['subject_template'] ?? ''; $body_template = $_POST['body_template'] ?? ''; $return_path = $_POST['return_path'] ?? ''; $domain_used = $_POST['domain_used'] ?? ''; $reply_to = $_POST['reply_to'] ?? ''; $content_type = $_POST['content_type'] ?? 'text/html; charset=utf-8'; $encoding = $_POST['encoding'] ?? 'quoted-printable'; $h1_name = $_POST['header_1_name'] ?? ''; $h1_value = $_POST['header_1_value'] ?? ''; $h2_name = $_POST['header_2_name'] ?? ''; $h2_value = $_POST['header_2_value'] ?? ''; $hash = md5($isp_target . $method . $from_email . time()); $stmt = $pdo->prepare("INSERT INTO admin.brain_configs (config_hash, isp_target, send_method, from_name, from_email, subject_template, body_template, return_path, domain_used, reply_to, content_type, encoding, header_1_name, header_1_value, header_2_name, header_2_value, source) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'manual')"); $stmt->execute([$hash, $isp_target, $method, $from_name, $from_email, $subject_template, $body_template, $return_path, $domain_used, $reply_to, $content_type, $encoding, $h1_name, $h1_value, $h2_name, $h2_value]); $message = '✅ Configuration créée!'; } if ($action === 'delete_config') { $id = (int)$_POST['id']; $pdo->exec("DELETE FROM admin.brain_configs WHERE id = $id"); $message = '✅ Configuration supprimée!'; } } // Charger les données complètes $configs = $pdo->query("SELECT * FROM admin.brain_configs ORDER BY id DESC")->fetchAll(PDO::FETCH_ASSOC); $winners = []; try { $winners = $pdo->query("SELECT w.*, c.send_method, c.from_email, c.domain_used, c.subject_template FROM admin.brain_winners w LEFT JOIN admin.brain_configs c ON w.config_id = c.id ORDER BY w.inbox_rate DESC LIMIT 20")->fetchAll(PDO::FETCH_ASSOC); } catch(Exception $e) {} $tests = []; try { $tests = $pdo->query("SELECT * FROM admin.brain_test_results ORDER BY created_at DESC LIMIT 50")->fetchAll(PDO::FETCH_ASSOC); } catch(Exception $e) { error_log($e->getMessage()); } $isp_profiles = []; $isp_indexed = []; try { $isp_profiles = $pdo->query("SELECT * FROM admin.isp_profiles ORDER BY isp_name")->fetchAll(PDO::FETCH_ASSOC); foreach ($isp_profiles as $isp) { $isp_indexed[strtoupper($isp['isp_name'] ?? '')] = $isp; $isp_indexed[$isp['isp_code'] ?? ''] = $isp; } } catch(Exception $e) {} ?> Brain Manager - Configurations & Winners Retour aux System Flows

Comment fonctionne le Brain Engine ?

⚙️
1
CONFIG
Créer config
(from, subject, headers)
📤
2
SEND
Envoyer aux seeds
(boîtes de test)
📬
3
CHECK
Vérifier IMAP
Inbox ou Spam ?
📊
4
SCORE
Calculer inbox rate
par ISP
🏆
5
WINNER
Config gagnante
→ Production
Objectif

Trouver les configs qui atteignent l'INBOX sur chaque ISP

Process

Le Brain teste automatiquement et apprend ce qui marche

Résultat

Inbox rate 88-100% avec les configs gagnantes

📰 Extracteur de Newsletters WEVAL - Comment il alimente le Brain
📥
1. COLLECT
Seeds inscrits sur newsletters (Amazon, Netflix...)
📬
2. SCAN IMAP
Connexion aux seeds, scan INBOX pour newsletters
🔍
3. EXTRACT
From, Subject, Headers, Body structure
🧠
4. LEARN
Brain analyse les patterns qui atteignent INBOX

💡 Pourquoi ? Les newsletters arrivent en INBOX = Leurs patterns fonctionnent. Le Brain copie ces patterns gagnants pour nos emails.

Brain Manager

Configurations, Tests & Winners pour maximiser l'inbox rate

Configurations
Cliquer pour voir
Winners
Cliquer pour voir
Tests
Cliquer pour voir
Inbox Rate %
Moyenne
Seeds
Harvest Manager
Configurations
Tests
Winners
ISP Profiles
Nouvelle Config
ID ISP Target Méthode From Name From Email Subject Return-Path Inbox % Status Actions
Aucune configuration
Email Config
From Name
From Email
Reply-To
Return-Path
Subject
Domain
IP Used
Headers & Format
Content-Type
Encoding
Charset
Header 1
Header 2
Header 3
Header 4
Header 5
Links & Tracking
Link URL
Image URL
Redirect Domain
Tracking Domain
Unsubscribe URL
List-Unsubscribe
DNS & Auth
SPF Record
DKIM Selector
DMARC Policy
SMTP Type
SMTP Account
Config Hash...
Stats & Delivery
Total Sent
Inbox
Spam
Bounce
Inbox Rate%
Confidence%
Stability%
Consec. Inbox
Consec. Spam
ISP Config ()
Filter Type
Volume/jour
Delay (sec)s
Best Time
Avg Inbox %%
Notes
Pas de profil ISP pour
Placeholders Disponibles
{name} Nom
{firstname} Prénom
{lastname} Nom
{email} Email
{domain} Domaine
{company} Entreprise
{date} Date
{id} ID unique
{random} Aléatoire
{unsubscribe} Désinscrire
{tracking} Pixel
{offer_link} Lien offre
Spintax: {spin:opt1|opt2|opt3}
Body Template (HTML) caractères
Body Template - Non défini
ID Job ID Config Seed Send Status Check Status Result Subject Date
Aucun test effectué - Lancez des tests pour voir les résultats ici
#
ID Config ISP Target Méthode Domain Inbox Rate Total Tests Stability Daily Limit Verified
Aucun winner
# % %
ISPCodeFilterVolumeDelayBest TimeAvg Rate
Aucun profil ISP
s %

Créer une nouvelle configuration

Cible & Méthode
Expéditeur
Variables: [Name], [Company], "Texte fixe"
Variables: [domain], [name]
Contenu
Variables: [ID], [Name], [Date]