I use PHPMAILER
on another site where it works perfectly. However, this same code does not allow me to send emails, it gives Sucesso
and no error appears. I used the code $mail->SMTPDebug = 2;
and I can not find any errors there.
Here is the code
require 'mail/PHPMailerAutoload.php';
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = 2;
$mail->Host = "servidor"; //nome do servidor está oculto
$mail->Port = 587;
$mail->SMTPAuth = false;
$mail->CharSet="utf-8";
$mail->From = "email1";
$mail->FromName = "Nome1";
$mail->AddAddress("email2");
$mail->IsHTML(true);
$mail->Subject = "Taasd";
$mail->Body = $titulo;
if(!$mail->Send()){
echo "<script>console.log('".$mail->ErrorInfo."')</script>";
exit;
}else{
echo "<script>console.log('Sucesso')</script>";
}