Can you try the code Please? Guess where I went wrong
```
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'vendor/autoload.php';
$mail = new PHPMailer(true);
try {
$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
$mail->SMTPDebug = 2;
$mail->isSMTP();
$mail->Host = "smtp.gmail.com";
$mail->SMTPAuth = true;
$mail->Username = "********@gmail.com";
$mail->Password = "********";
$mail->SMTPSecure = "tls";
$mail->Port = 587;
$mail->setFrom("********@gmail.com", "My name");
$mail->addAddress("********@gmail.com");
$mail->isHTML(true);
$mail->Subject = "Mailer Test";
$mail->Body = "This is a Test";
$mail->send();
echo "Ok";
} catch (Exception $e) {
echo "No";
}
```
There are two duplicate errors that are written twice in output : SMTP Error: Could not authenticate. SMTP Error: Could not authenticate. what's the problem? Can you write the modify code