$email]); if (!empty($res['success'])) { header('Location: index.php?status=success#contact'); } else { // In a real app, you would log the error. // error_log('MailService Error: ' . $res['error']); header('Location: index.php?status=error#contact'); } exit;