Foros del Web » Programando para Internet » PHP »

hacer llegar emails a cuentas de hotmail

Estas en el tema de hacer llegar emails a cuentas de hotmail en el foro de PHP en Foros del Web. Hola a todos, estoy usando el siguiente script http://www.phpnoise.com/tutorials/12/5 pero no se porque circunstancias no llega los mails enviados con este script a usuarios de ...
  #1 (permalink)  
Antiguo 29/07/2006, 03:08
Avatar de pereztroff  
Fecha de Ingreso: junio-2002
Ubicación: En la Internet.
Mensajes: 4.068
Antigüedad: 21 años, 10 meses
Puntos: 5
Pregunta hacer llegar emails a cuentas de hotmail

Hola a todos, estoy usando el siguiente script http://www.phpnoise.com/tutorials/12/5
pero no se porque circunstancias no llega los mails enviados con este script a usuarios de hotmail ¿alguna recomendacion o solucion? gracias

os dejo el codigo que se usa

Código PHP:
<?php 
    
require_once('Mail.php');      // These two files are part of Pear, 
    
require_once('Mail/Mime.php'); // and are required for the Mail_Mime class 

    
$to "[email protected]"
        
// the email address of the person receiving the email 
    
$from "[email protected]"
        
// the email address of the sender 
    
$subject "This is a test email"
        
// the subject of the email 
    
$attachment "/path/to/someFile.pdf"
        
// the path to the file we are attaching to the email 

    // Next we must build an array of email headers for the email. 
    // This is structured slightly differently to the mail() function. 
    // The array key is the header name. Remember that subject 
    // is a header too! 
    
$headers = array('From'    => $from
                     
'Subject' => $subject); 

    
// Here we create the plaintext version of the email to be sent 
    
$textMessage "Dear John,\n\nThis is a fake email, I hope you enjoy it.\n\nFrom Jane."

    
// Here we create the HTML version of the email to be send, using 
    // the heredoc syntax 
    
$htmlMessage = <<<EOF 
<html
  <
body bgcolor="#ffffff"
    <
p align="center"
        <
b>Hello World!</b
    </
p
  </
body
</
html
EOF;

    
$mime = new Mail_Mime(); 
        
// create a new instance of the Mail_Mime class 
    
$mime->setTxtBody($textMessage); 
        
// set our plaintext message 
    
$mime->setHtmlBody($htmlMessage); 
        
// set our HTML message 
    
$mime->addAttachment($attachment); 
        
// attach the file to the email 

    
$body $mime->get(); 
        
// This builds the email message and returns it to $body. 
        // This should only be called after all the text, html and 
        // attachments are set. 

    
$hdrs $mime->headers($headers); 
        
// This builds the corresponding headers for the plaintext, 
        // HTML and any other required headers. It also includes 
        // the headers we created earlier by passing them as an argument. 

    
$mail = &Mail::factory('mail'); 
        
// Creates an instance of the mail backend that we can use 
        // to send the email. 

    
$mail->send($to$hdrs$body); 
        
// Send our email, according to the address in $to, the email 
        // headers in $hdrs, and the message body in $body. 
?>
  #2 (permalink)  
Antiguo 29/07/2006, 08:52
Avatar de juaniquillo
Colaborador
 
Fecha de Ingreso: noviembre-2005
Ubicación: San Juan, Puerto Rico
Mensajes: 5.745
Antigüedad: 18 años, 4 meses
Puntos: 281
Hotmail tiene un nuevo sistema anti-spam el cual es mas estricto que el anterior. Si estas enviando los emails desde tu computadora y el domain name no concuerda con tu ip lo mas probable es que hotmail no lo acepte. eso no tiene que ver nada con php, sino con hotmail.
__________________
Por fin.. tengo algo parecido a un blog
Y por lo visto ya estoy escribiendo...
  #3 (permalink)  
Antiguo 29/07/2006, 11:00
Avatar de pereztroff  
Fecha de Ingreso: junio-2002
Ubicación: En la Internet.
Mensajes: 4.068
Antigüedad: 21 años, 10 meses
Puntos: 5
el codigo se ejecuta en un servidor linux
  #4 (permalink)  
Antiguo 31/07/2006, 07:30
O_O
 
Fecha de Ingreso: enero-2002
Ubicación: Santiago - Chile
Mensajes: 34.417
Antigüedad: 22 años, 3 meses
Puntos: 129
Cita:
Iniciado por pereztroff
el codigo se ejecuta en un servidor linux
Da igual si es "linux" o se es tu PC el que hace de servidor o es tu proveedor ..

Lo que importa principalmente es que tu servidor SMTP (o MTA que usa tu proveedor) esté registrado bajo su dominio correspondiente (y para el e-mail: registros MX asociados) .. Tampoco que digas ser "FROM:" [email protected] y lo envies realmente por [email protected] .. Ese tipo de cosas los filtros de anti-SPAM (Y más los "fuertes" filtros como proveedores como el que mencionas aplican) es lo primero que detectan como "me estás engañando: dices ser de tal sitio pero lo envias por otro sitio ..".

Eso sería una de las causas .. Pero no es la única, realmente no he visto documento exacto de como "hotmail" filtra sus mensajes .. pero lo hace y hasta que no sepas "por qué" te rechaza los e-mails o bajo que criterío no podrás componer el e-mail como corresponde para pasar dichos filtros.

Un saludo,
__________________
Por motivos personales ya no puedo estar con Uds. Fue grato haber compartido todos estos años. Igualmente los seguiré leyendo.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:09.