Ver Mensaje Individual
  #4 (permalink)  
Antiguo 26/06/2008, 21:25
Avatar de Gerald
Gerald
 
Fecha de Ingreso: julio-2003
Mensajes: 1.356
Antigüedad: 23 años, 3 meses
Puntos: 2
Respuesta: Enviar mensaje a hotmail desde php

yo le añadiría estas cabeceras, aunque con hotmail casi siempre clasifica de spam los correos enviados de esta manera, trata de enviarle la máxima información posible a los servidores de hotmail.
Código PHP:
        $mailheaders = "MIME-Version: 1.0 \r\n"; 
    
$mailheaders .= "Content-type: text/html; charset=iso-8859-1 \r\n"; 
    
$mailheaders .= "From: $nombre <$email> \r\n"; 
    
$mailheaders .= "Return-path: $nombre <$email> \r\n";
    
$mailheaders .= "X-Priority: 1 \r\n"; 
    
$mailheaders .= "X-MSMail-Priority: High \r\n"; 
    
$mailheaders .= "X-Mailer: PHP/".phpversion()." \n"; 
tu código quedaría así:

Código PHP:
<? 
$nombre
= $_POST['nombre']; 
$email = $_POST['email']; 
$titulo= $_POST['titulo']; 
$mensaje = $_POST['mensaje']; 

//$headers .= "MIME-Version: 1.0\n";  
//$headers .= "Content-type: text/html; charset=iso-8859-1\n";  
//$headers .= "From: $_POST[nombre] <$_POST[email]>";
        
$mailheaders = "MIME-Version: 1.0 \r\n"; 
    
$mailheaders .= "Content-type: text/html; charset=iso-8859-1 \r\n"; 
    
$mailheaders .= "From: $nombre <$email> \r\n"; 
    
$mailheaders .= "Return-path: $nombre <$email> \r\n";
    
$mailheaders .= "X-Priority: 1 \r\n"; 
    
$mailheaders .= "X-MSMail-Priority: High \r\n"; 
    
$mailheaders .= "X-Mailer: PHP/".phpversion()." \n"; 

if (isset(
$email)): 
# la dirección electrónica a la que enviar el email 
$target="[email protected]"; 

mail($target, 
     
$titulo, 
     
"Nombre: ".$nombre. 
     
"\nEmail: ".$email. 
     
"\nTítulo: ".$titulo. 
     
"\nMensaje: ".$mensaje, 
     
$headers); 
endif; 
?>
Saludos!
__________________
Solo por Hoy: Trataré de fortalecer mi mente. Estudiaré y aprenderé algo útil
Hoteldipity
Arte Caracol