try { // Server settings $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = 'tbsm1891@gmail.com'; // Your SMTP username $mail->Password = 'aznr sgwz ulxo hcvp'; // Your SMTP password (use app password if using 2FA) $mail->SMTPSecure = 'tls'; // Enable TLS encryption $mail->Port = 587; // TCP port to connect to