Как убрать текст логов PHP после отправки данных

У меня есть след. код для отправки данных с формы на почту через PHPMailer:

<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require '../vendor/autoload.php';

$mail = new PHPMailer;

    //Server settings
    $mail->isSMTP();  
    $mail->SMTPDebug = 2;                     
    $mail->Host       = 'smtp.titan.email';   
    $mail->SMTPAuth   = true;                 
    $mail->Username   = 'EMAIL';
    $mail->Password   = 'PASSWORD'; 
    $mail->SMTPSecure = 'tls';   
    $mail->Port       = 587;                       

    //Recipients
    $mail->setFrom('EMAIL', 'Mailtrap');
    $mail->addAddress('EMAIL', "Receiver");
        
        $subject = $_POST['subject'];
        $name = $_POST['name'];
        $email = $_POST['email'];
        $phone = $_POST['phone'];
        $text = $_POST['text'];

    //Content
    $mail->isHTML(true);                                  
    $mail->Subject = $subject;

    $mail->Body = "Application was submitted from the site \r\n" . "Name: " . $name . "\r\n" . "Email: " . $email . "\r\n" . "Phone: " . $phone . "\r\n" . "Text: " . $text; 
    
    if (!$mail->send()) {
        echo 'Mailer Error: ' . $mail->ErrorInfo;
    } else {
        echo '<div style="display: flex; justify-content: center; align-items:center; flex-direction: column; width: 100%; height: 100vh; color: #333; font-family: sans-serif;">
        <h1>Your application has been successfully sent</h1>
        <span>Back to <a href="https://domain.net" style="color: #11C2FE;">home page</a></span>
    </div>';
    }
?>

Все работает и текст отправляется на почту. Но после отправки отображается след. текст: введите сюда описание изображения введите сюда описание изображения Как я могу скрыть весь этот текст и оставить мой html?


Ответы (0 шт):