I have been working in my aplication, and some errors appeared for me, actually I did not understand the reason.
In my local machine, the PHPMailer works perfectly with zoho, when I put all my codes in the server (virtual machine from google), I can not send an e-mail. The mistake is time out, and can't connect with zoho.
Is there the possibility the firewall from zoho is blocking the server from google? Any suggestion?
<?php
require("phpmailer/_lib/class.phpmailer.php");
$phpmail = new PHPMailer();
$erros = "";
if( empty($erros) ){
$phpmail->IsSMTP();
$phpmail->Host = "smtp.zoho.com";
$phpmail->SMTPAuth = true;
$phpmail->Username = 'e-mail_zoho';
$phpmail->Password = 'senha_e-mail_zoho';
$phpmail->Port = 587;
$phpmail->From = "e-mail_zoho";
$phpmail->FromName = "e-mail_zoho";
$phpmail->SMTPSecure = 'tls';
$phpmail->AddAddress('destinatario', 'Alexandre');
$phpmail->IsHTML(true);
$phpmail->CharSet = 'UTF-8';
$phpmail->Subject = "Teste";
$phpmail->Body .=
"
<body>
<p>teste</>
</body>
$enviado = $phpmail->Send();
$phpmail->ClearAllRecipients();
$phpmail->ClearAttachments();
echo json_encode($enviado);
}
?>