<?php
require_once __DIR__ . '/../../includes/email.php';

try {
    sendBankEmail(
        $email,
        'Security Code',
        $name ?? 'Valued Customer',
        'Your Verification Code',
        '<p>Your authentication code is:</p>
        <p style="text-align:center;font-size:28px;font-weight:700;letter-spacing:6px;color:#0a1f44;padding:16px 32px;background:#f0f2ff;border-radius:6px;margin:16px 0;">' . htmlspecialchars($code, ENT_QUOTES, 'UTF-8') . '</p>
        <p>This code expires shortly. If you did not request this code, please contact us immediately.</p>'
    );
} catch (Exception $e) {
    error_log('Email send failed: ' . $e->getMessage());
}
