Files
wevads-platform/scripts/test_email_send.php
2026-02-26 04:53:11 +01:00

66 lines
2.3 KiB
PHP

<?php
/**
* TEST EMAIL SENDER - Validation du système Brain
*/
$to = $argv[1] ?? 'Joecloud0101@proton.me';
$subject = "🧠 WEVADS Brain Test - " . date('Y-m-d H:i:s');
$headers = [
'From: WEVADS Brain <brain@wevads.com>',
'Reply-To: noreply@wevads.com',
'X-Mailer: WEVADS-Brain-Engine/1.0',
'Content-Type: text/html; charset=UTF-8',
'List-Unsubscribe: <mailto:unsubscribe@wevads.com>',
];
$body = '
<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"></head>
<body style="font-family: Arial, sans-serif; background: #1a1a2e; color: #ffffff; padding: 40px;">
<div style="max-width: 600px; margin: 0 auto; background: #16213e; border-radius: 15px; padding: 30px;">
<h1 style="color: #a855f7; text-align: center;">🧠 WEVADS Brain Engine</h1>
<h2 style="color: #22c55e; text-align: center;">✅ Test Email Réussi!</h2>
<div style="background: #0f172a; border-radius: 10px; padding: 20px; margin: 20px 0;">
<p><strong>📅 Date:</strong> ' . date('Y-m-d H:i:s') . '</p>
<p><strong>📧 Destinataire:</strong> ' . $to . '</p>
<p><strong>🖥️ Serveur:</strong> ' . gethostname() . '</p>
<p><strong>🔧 Méthode:</strong> PHP mail()</p>
</div>
<p style="text-align: center; color: #9ca3af;">
Si vous recevez cet email, le système Brain Engine est opérationnel!
</p>
<div style="text-align: center; margin-top: 30px;">
<a href="http://89.167.40.150:5821/brain-dashboard.php"
style="background: #a855f7; color: white; padding: 12px 30px; border-radius: 8px; text-decoration: none;">
📊 Voir Brain Dashboard
</a>
</div>
<p style="text-align: center; color: #6b7280; font-size: 12px; margin-top: 30px;">
WEVADS - Email Deliverability Platform<br>
<a href="#" style="color: #6b7280;">Unsubscribe</a>
</p>
</div>
</body>
</html>
';
echo "📧 Envoi email de test vers: $to\n";
echo "📝 Subject: $subject\n";
echo str_repeat("-", 50) . "\n";
$result = mail($to, $subject, $body, implode("\r\n", $headers));
if ($result) {
echo "✅ Email envoyé avec succès!\n";
echo "📬 Vérifie ta boîte: $to\n";
} else {
echo "❌ Échec de l'envoi\n";
echo "Erreur: " . error_get_last()['message'] ?? 'Unknown' . "\n";
}