<?php
add_action('template_redirect', function () {
ob_start();
});
Solution:
$msg_email = 'Email enviado com sucesso!';
header('Location: ../login.php?msg_email=' . $msg_email);
$mail->send();
Error - Cannot modify header information - headers already sent by ... :
$mail->send();
$msg_email = 'Email enviado com sucesso!';
header('Location: ../login.php?msg_email=' . $msg_email);
In WordPress, check for a PHP version update, if you are losing the latest PHP version, revert back to an old PHP version, upgrade you WordPress version to the latest, then update again to the latest PHP verion.