Hello. The problem is this: I send emails in html format using phpmailer, and I get a bunch of different information about the shipment on the screen, although the letters get excellent. Moreover, if you leave only a couple of tags, the message is not displayed. Here is the code of departure

$mail = new PHPMailer(false); $mail->isSMTP(); $mail->Host = $smtp['host']; $mail->SMTPDebug = $smtp['debug']; $mail->SMTPAuth = $smtp['auth']; $mail->Port = $smtp['port']; $mail->SMTPSecure = $smtp['secure']; $mail->CharSet = $smtp['charset']; $mail->Username = $smtp['username']; $mail->Password = $smtp['password']; $mail->addAddress("$email", "$firstname $lastname"); $mail->setFrom('...', '...'); $mail->Subject = htmlspecialchars('Подтверждение почтового адреса'); $text = file_get_contents(MAIL_PATH."/mail_registration.html"); $text = str_replace(['%name%', '%code%'], [$firstname, $code], $text); $mail->Body = $text; $mail->isHTML(true); $mail->send(); 

In the mail_registration.html file, only p tags and a pair of div

    1 answer 1

    Try replacing the line with this:

     $mail->SMTPDebug = false;