mercredi 22 avril 2015

PhpMailer sends to gmail but not to hotmail accounts

I know this has been asked before, but i wanted to show my case because i tried to solve it with other answers but i coundt solve it.

I m trying to do a Contact form but when i choose the email of the receiver if i choose @hotmail.com or @advancedinstitute.cl they dont receive the email. I tried to choose another type of email like gmail, yahoo or terra and the email arrives without problem.

I know it must be because the spam policies of those servers but i dont know how to fix it.

This is my code of the phpMailer:

$mail = new PHPMailer();
$mail->Host = "localhost";
$mail->Hostname = "Advanced Institute";
$mail->From = $_POST["email"];
$mail->FromName = $_POST["email"];
$mail->Subject = "Quiero contactarme con Advanced Institute";
$mail->AddAddress("carmeng.advanced@terra.cl","Advanced Institute");
$mail->AddReplyTo($_POST["email"]);
$mail->IsHTML(true); // El correo se envía como HTML
$body = '<html><body><div>Nombre : '.$_POST["nombre"].'<br>  Email :    '.$_POST["email"].'<br>  Telefono : '.$_POST["telefono"].'<br>  Asunto : '.$_POST["asunto"].'<br>  Comentarios:           '.$_POST["comentarios"].'<br> </div></body></html>';
$mail->Body = $body;    
    if(!$mail->Body) {
        echo 'Error: ' . $mail->ErrorInfo;
    }else{
    $mail->Send();

I hope my english was enough for you guys to understand my problem. THANK YOU IN ADVANCED




Aucun commentaire:

Enregistrer un commentaire