I am doing authenticated submissions, however it is strange that sometimes it sends normally, and sometimes it fails. The client insists that on his server everything is correct, and now I am already without arguments. The version I use is 5.2.8, would anyone have any suggestions?
$mail = new PHPMailer();
$mail->isSMTP();
$mail->SMTPAuth = true;
$mail->SMTPDebug = 0;
$mail->Debugoutput = 'html';
$mail->Host = $email_host;
$mail->Port = $email_port; //587
$mail->Username = $email_send;
$mail->Password = $email_pass;
$mail->setFrom($email_send, 'Site');
$mail->addAddress($destino);
if ($mail->send())
{
echo 'Enviado';
}
else
{
echo $mail->ErrorInfo;
}