✓ File contains NEW code (DSN approach) ✓ File contains DEBUG logging ✓ File contains scheme logic File last modified: 2026-05-21 09:24:19 --- First lines of sendViaSMTP method --- private static function sendViaSMTP( array $cfg, string $toEmail, string $toName, string $subject, string $html ): void { $encryption = strtolower($cfg['encryption'] ?? ''); // Build DSN string based on encryption type // Format: smtp://user:pass@host:port // For TLS/STARTTLS: use smtp:// (not smtps://) // For SSL: use smtps:// $scheme = 'smtp'; if ($encryption === 'ssl') { $scheme = 'smtps'; // Port 465 - direct SSL } $username = urlencode($cfg['username'] ?? ''); $password = urlencode($cfg['password'] ?? ''); $host = $cfg['host']; ✓ Verification complete