Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/09/2009, 23:09
vissiontotal
 
Fecha de Ingreso: mayo-2008
Mensajes: 103
Antigüedad: 16 años
Puntos: 0
multiples noticias en boletin....

Hola amigos tengo este codigo que se encarga de mandar una noticia a los usuarios reistrados en el boletin... Funciona muy bien todo.......... lo que me gustaria hacer es poder enviar varios encabezados de una 10 noticias....
estoy manejando los Id de las noticias y los encabezados con los recorSet de que da Dreamweaver

Código PHP:
$email_destino    $row_boletines['correo'];
// crear mensaje
        
$mensaje "Hola " .$row_boletines['nombre']."</p>";
        
$mensaje .= "</p>";                                                                                                $mensaje .= "Creemos que la siguiente noticia puede ser de tu interés y por eso te la hemos enviado.... </p>";
        
$mensaje .= "</p>";
        
$id $row_noticia['noticia_id'];
        
$enlace "www.vissiontotal.com/noticia_ver.php?noticia_id=$id";
        
$noticia $row_noticia['encabezado'];
         
$mensaje .= "<p><font size=5><font face=arial> <a href='$enlace'>$noticia</a></font></font></p>";
        
$mensaje .= "</p>";
        
$mensaje .= "<font size=3><font face=arial>Si consideras que hay mas personas a las que les puede interesar esta informacion comparteles este correo....</font></font>";
        
$mensaje .= "</p>";
        
$mensaje .= "<font size=3><font face=arial>Gracias por utilizar nuestro servicio...</font></font>";
        
$mensaje .= "</p>";
        
$mensaje .= "</p>";
        
$mensaje .= "</p>";
        
$mensaje .= "<font size=2><font face=arial><a href=www.vissiontotal.com/baja_boletin.php?mail=$email_destino>Si deseas dejar de recibir estos mensajes por favor da CLIC AQUI</font></font>";

$formato          "html"
//*****************************************************************// 
$headers  "From: $nombre_origen <$email_origen> \r\n"
$headers .= "Return-Path: <$email_origen> \r\n"
$headers .= "Reply-To: $email_origen \r\n"
$headers .= "Bcc: $email_ocultos \r\n"
$headers .= "X-Sender: $email_origen \r\n"
$headers .= "X-Mailer: [Habla software de noticias v.1.0] \r\n"
$headers .= "X-Priority: 3 \r\n"
$headers .= "MIME-Version: 1.0 \r\n"
$headers .= "Content-Transfer-Encoding: 7bit \r\n"
$headers .= "Disposition-Notification-To: \"$nombre_origen\" <$email_origen> \r\n"
//*****************************************************************// 

if($formato == "html"
 { 
$headers .= "Content-Type: text/html; charset=iso-8859-1 \r\n";  } 
   else 
    { 
$headers .= "Content-Type: text/plain; charset=iso-8859-1 \r\n";  } 



 do{ 
mail($email_destino$asunto$mensaje$headers);
    
$mails_enviados=$mails_enviados+1;
    
$enviarmail "ok" ;  
    }
    while (
$row_boletines mysql_fetch_array($boletines));



Co neste otro trozo enlisto las 10 noticias que me gustaria poder enviar un un boletin.... Tambien funcioan bien...

Código PHP:
<?php do { ?>
                      <table width="731" border="0">
                        <tr>
                          <td width="304" class="textitos_login"><input name="noticia" type="text" class="textos_alerta" id="noticia" value="<?php echo $row_noticia['encabezado']; ?>" size="140" /></td>
                          <td width="304" class="textitos_login"><a href="borrar_noticia_boletin.php?noticia_id=<?php echo $row_noticia['noticia_id']; ?>"><img src="../imagenes/cruz.jpg" width="17" height="17" border="0" /></a></td>
                        </tr>
                      </table>
                      <?php } while ($row_noticia mysql_fetch_assoc($noticia)); ?>