0
I use the PHPMAILER
on another site of mine where it is working perfectly. However, that 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 find no mistake there.
Here’s 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>";
}
You are using port 587 and Smtpauth false !?
– rbz
@RBZ Uhhhh yes, I did something wrong?
– I_like_trains