El problema es q lo vas pisando con la línea, es decir, que elimina lo anterior
Código PHP:
$mensaje = "<html>";
Solución
Código PHP:
$result2 = $db->sql_query("SELECT * FROM *** WHERE **='0' ORDER BY time DESC LIMIT 0,5");
if ($db->sql_numrows($result2) > 0) {
$mensaje = "<html>";
$mensaje .= "<head>";
$mensaje .= "<title>Untitled Document</title>";
$mensaje .= "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">";
$mensaje .= "</head>";
$mensaje .= "<body>";
$mensaje .= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"118\">";
while ($row2 = $db->sql_fetchrow($result2)) {
$sid = intval($row2['sid']);
$informant = $row2['***'];
$titlebig = $row2['title'];
$textbig = $row2['***'];
$title = substr($titlebig, 0, 38);
$text = substr($textbig, 0, 130);
$comentarios= $row2['***'];
$text2 = $row2['***'];
$notero = $row2['***'];
$categoria = $row2['***'];
$ratings = $row2['***'];
$mensaje .= " <tr>";
$mensaje .= " <td width=\"86%\" align=\"left\" valign=\"top\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"10\">";
$mensaje .= " <tr>";
$mensaje .= "<td align=\"left\" valign=\"top\">";
$mensaje .= "<a href=\"http://www.gamebox.cl/modules.php?name=News&****\" class=\"titulo_noticias\" >$title...</a><br>$text...<br><br><a href=\"http://www.gamebox.cl/modules.php?name=News&file=****\" class=\"archivo_news\" >Noticia completa</a><font class=\"informante_noticias\"> |$comentarios Comentarios|</font><hr>";
$mensaje .= "</td>";
$mensaje .= " </tr>";
$mensaje .= "</table>";
$mensaje .= " <td width=\"14%\" align=\"center\" valign=\"top\">";
$mensaje .= "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
$mensaje .= " <tr>";
$mensaje .= " <td align=\"left\" valign=\"top\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
$mensaje .= " </table></td>";
$mensaje .= " </tr>";
$mensaje .= " <tr>";
$mensaje .= " <td align=\"left\" valign=\"top\" bgcolor=\"#900000\"><table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">";
$mensaje .= " <tr>";
$mensaje .= " <td> </td>";
$mensaje .= " <td align=\"center\" valign=\"middle\"><a href=\"http://www.gamebox.cl/modules.php?name=News&file=***\"><img src=\"http://www.gamebox.cl/***/$sid.jpg\" width=\"100\" height=\"75\" border=\"0\" class=\"imagenes\"></a></td>";
$mensaje .= " <td></td>";
$mensaje .= " </tr>";
$mensaje .= " </table></td>";
$mensaje .= " </tr>";
$mensaje .= " <tr>";
$mensaje .= " <td align=\"left\" valign=\"top\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
$mensaje .= " </table></td>";
$mensaje .= " </tr>";
$mensaje .= "</table>";
$mensaje .= "";
$mensaje .= "</td></tr>"; //me parece q faltaba un </tr>
}
$mensaje .= "</table>";
$mensaje .= "";
$mensaje .= "</body>";
$mensaje .= "</html>";
}
$admin = "****@gamebox.cl";
####################FIN NOTICIAS
mail($admin,"Boletin de Noticias",$mensaje,"Content-Type: text/html; charset=iso-8859-1\r\n");