@TigerMANEK426 It was already fixed as said by the Admin:
@JohnEmmanuel That script works, as I can see on the bottom “Message has been sent”. But note that with Gmail SMTP you can only send emails from your Gmail email address and not with custom domains, unless your domain is on G Suite. Also, it’s better to set to 0 or remove the SMTP debug from a fully working script.
@Sarvesh_M_Rao Using $mail->SMTPDebug = 2 equals to using $mail->SMTPDebug = SMTP::DEBUG_SERVER, so both of them are indifferent. You might want to check the wiki on SMTP Debugging · PHPMailer/PHPMailer Wiki · GitHub for more.