A ver si alguien tiene idea...
Tengo este código php que en esencia sirve para recomendar una web a 3 amigos (simple), el tema es que envía los mails de recomendación dependiendo del servidor de correo
![Stress](http://static.forosdelweb.com/fdwtheme/images/smilies/stress.png)
Por ej. si lo mando a yahoo, adinet, gmail NO llegan, pero si los mando a mails "privados" (o sea mails de mis dominios), SÍ llegan
![ojotes](http://static.forosdelweb.com/fdwtheme/images/smilies/ojotes.png)
![ojotes](http://static.forosdelweb.com/fdwtheme/images/smilies/ojotes.png)
Acá dejo el codigo PHP
Código PHP:
<?php
//RECOJO LOS DATOS DE UN FORM PREVIAMENTE COMPLETADO
$nombre = $_POST['nombre'];
$mail = $_POST['mail'];
$nombre1 = $_POST['nombre1'];
$mail1 = $_POST['mail1'];
$nombre2 = $_POST['nombre2'];
$mail2 = $_POST['mail2'];
$nombre3 = $_POST['nombre3'];
$mail3 = $_POST['mail3'];
//HEADERS DEL MAIL A ENVIAR
$headers = "MIME-Version: 1.0\r\n" ;
$headers .= "Content-type: text/html; charset=utf-8\r\n";
$headers .= "From: ".$nombre." <".$mail.">\r\n";
//COMPRUEBO SI HAY POR LO MENOS 1 MAIL DE DESTINO Y 1 DE ORIGEN
if ($mail != "" && $nombre != "" && $mail1 != "" && $nombre1 != ""){
//ARMO EL CONTENIDO DEL MAIL
$recipient = "".$mail1;
if ($mail2){ $recipient .= ",".$mail2; }
if ($mail3){ $recipient .= ",".$mail3.""; }
$subject = $nombre." te ha regalado una invitación...";
$msg = $nombre." (<a href='mailto:".$mail."'>".$mail."</a>) ";
$msg .= "desea recomendarte esta web: www.XXXXXXXXX.com <br />";
$msg .= "<br /><br />Puedes ampliar información, ingresando a <a href='http://www.XXXXXXXXXXX.com/'>XXXXXXXXXX.com</a><br /><br /><small>Para visualizar este mail debes estar conectado, si no puedes verlo, has <a href='http://www.XXXXXXXXXX.com/unacarta.php'>clic aquí</a></small>";
//ENVIO EL (O LOS - HASTA 3) CORREOS
mail($recipient, $subject, $msg, $headers);
//ENVIO UN CORREO AL ADMINISTRADOR DEL SITIO PARA AVISAR
$subject_admin = $nombre." recomendó la web";
$msg_admin = $nombre." (".$mail.") le recomendó la web a:<br /><br />".$nombre1." - ".$mail1."<br />".$nombre2." - ".$mail2."<br />".$nombre3." - ".$mail3."<br />";
mail("[email protected]", $subject_admin, $msg_admin, $headers);
/MUESTRO EN PANTALLA UNA CONFIRMACIÓN DEL ENVÍO
echo '<div style="background-color:#8CB6E7; text-align:center; width:100%;">Una carta fue envíada a tu(s) amigo(s).</div>';
}
?>
Muchas gracias por tomarse el tiempo para leer esto
![de acuerdo](http://static.forosdelweb.com/fdwtheme/images/smilies/dedosarriba.png)
![Adios](http://static.forosdelweb.com/fdwtheme/images/smilies/adios.gif)