Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/08/2008, 16:42
Germank
 
Fecha de Ingreso: julio-2007
Mensajes: 18
Antigüedad: 16 años, 10 meses
Puntos: 0
mail(): no llegan a hotmail ni a yahoo

Hola a todos, aqui estoy nuevamente con un problema, esta vez con la funcion mail(), que me anda bien si los mail que envio desde mi web van para gmail, de lo contrario no llegan, ni siquiera como spam, al codigo lo saque de los comentarios de la pagina de php (http://il.php.net/manual/es/ref.mail.php) pero nada, todo sigue igual, les paso el codigo para el que entienda un poco (y tenga otro poco de ganas....). Desde ya mil gracias por su tiempo.

Código PHP:
$eol="\r\n";
                        
$mime_boundary=md5(time());
                        
$fromaddress "[email protected]";
                        
$fromname "Mazikacafe";

                        
$headers .= "From: ".$fromname."<".$fromaddress.">".$eol;
                        
$headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol;
                        
$headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol;    // these two to set reply address
                        
$headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol;
                        
$headers .= "X-Mailer: PHP v".phpversion().$eol;          // These two to help avoid spam-filters

  # Boundry for marking the split & Multitype Headers
                        
$headers .= 'MIME-Version: 1.0'.$eol;
                        
$headers .= "Content-Type: multipart/mixed; boundary=\"".$mime_boundary."\"".$eol.$eol;


                        
$body "Hello,\n\n To finalize your registration and activate your account, please click on the following URL:\n\n";
                        
$body .= "http://www.mazikacafe.com/online/user/receivingActivation.php?id=$aleatorio\n\n";
                        
$body .= "Thank you.\n";

# Open the first part of the mail
                        
$msg "--".$mime_boundary.$eol;
 
                        
$htmlalt_mime_boundary $mime_boundary."_htmlalt"//we must define a different MIME boundary for this section
  # Setup for text OR html -
                        
$msg .= "Content-Type: multipart/alternative; boundary=\"".$htmlalt_mime_boundary."\"".$eol.$eol;

  
# Text Version
                        
$msg .= "--".$htmlalt_mime_boundary.$eol;
                        
$msg .= "Content-Type: text/plain; charset=iso-8859-1".$eol;
                        
$msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
                        
$msg .= $body.$eol.$eol;
                        
                        
$msg .= "--".$htmlalt_mime_boundary."--".$eol.$eol;
                        
                        
$msg .= "--".$mime_boundary."--".$eol.$eol;


                        
                        
$subject "SignUp new user";

                        if(
mail($email,$subject,$msg,$headers)){
                            
header("Location: http://www.mazikacafe.com/online/user/signupSended.php?email=".$email);
                        }
                        else{
                            
$_SESSION['error'] = "There has been an error in sending its code activiacion, please try again. Thank you.";
                            
header("Location: http://www.mazikacafe.com/online/user/signup.php");
                        }
                } 
Saludos
German.