Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/08/2008, 11:28
diazhh
 
Fecha de Ingreso: septiembre-2007
Mensajes: 139
Antigüedad: 17 años, 6 meses
Puntos: 1
AYUDA CON mail()

hola buenas tardes, tengo un problema con la funcion mail y espero que logren ayudarme.
Estoy intentando hacer un boletin semanal para una pagina de relatos para adultos que esta hecha en una version mas segura del popular php-nuke, ya q la pag la hice hace muchos años

bueno le explico, tengo una funcion que me genera un codigo html.
el codigo es el siguiente:
Código PHP:
function cuerpo($id){

$query1="SELECT * FROM nuke_users WHERE user_id = $id";
$result1 = mysql_query($query1);
$result2 = mysql_fetch_array($result1);





?>


<html> 
<head> 
   <title>Correo Masivo</title> 
</head> 
<body>
 
<BODY BGCOLOR=#000000 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table id="G-Tech_Header" width="100%" height="305" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="27"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-izq.jpg" width="27" height="305" alt=""></td>
    <td width='50%' height='305' background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-back.jpg"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-back.jpg" width="11" height="305" alt=""></td>
    <td width="691"><table width="691" height="305" border="0" cellpadding="0" align="center" cellspacing="0">
      <tr>
        <td width="691"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-top.jpg" width="691" height="100" alt=""></td>
      </tr>
      <tr>
        <td width="691"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-mid.jpg" width="691" height="109" alt=""></td>
      </tr>
      <tr>
        <td width="691"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-dwn.jpg" width="691" height="96" alt=""></td>
      </tr>
    </table></td>
    <td width='50%' height='305' background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-back.jpg"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-back.jpg" width="11" height="305" alt=""></td>
    <td width="27"><img src="http://www.porneia.com.ve/relatos/themes/G-Tech/images/header-der.jpg" width="27" height="305" alt=""></td>
  </tr>
  
</table> 
  <table id='G-Tech_footer' width='100%' height='200' border='0' cellpadding='0' cellspacing='0'>
  <tr>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/leftside.gif"></td>
    <td>
    
    
    <table>
        <tr>
            <td><font color="#FFFFFF">Buenas Noches <b><?php echo $result2[username?></b>, este es el resumen de actividades de tu portal de Relatos Eroticos</font></td>
        </tr>
        <tr>
            <td><font color="#FFFFFF" size="+2">Te presentamos los ultimos 10 relatos publicados hasta el momento:</font></td>
        </tr>
    </table>
    
    
    </td>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/rightside.gif"></td>
</tr>
</table>

</table> 
  <table id='G-Tech_footer' width='100%' height='200' border='0' cellpadding='0' cellspacing='0'>
  <tr>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/leftside.gif"></td>
    <td>
    
    
    <table>
        <tr>
            <td><?php 
            $resultados
=mysql_query("Select sid from nuke_stories ORDER BY sid DESC LIMIT 10");
            while (
$result=mysql_fetch_array($resultados))
      { 
            
            
un($result[sid]);
            }
            
            
?></td>
        </tr>
        
    </table>
    
    
    </td>
    <td width="27" background="http://www.porneia.com.ve/relatos/themes/G-Tech/images/rightside.gif"></td>
</tr>
</table>
 
 <table id='G-Tech_footer' width='100%' height='200' border='0' cellpadding='0' cellspacing='0'>
  <tr>
    <td colspan='3'>
            <img src='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_izquierdo.jpg' width='27' height='200' alt=''></td>
    <td background='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_back.jpg' width='50%' height='200'></td>
    <td><img src='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_centro.jpg' width='674' height='200' alt='' /></td>
    <td background='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_back.jpg' width='50%' height='200'></td>
    <td><img src='http://www.porneia.com.ve/relatos/themes/G-Tech/images/G-Tech_footer_derecho.jpg' width='27' height='200' alt='' /></td>
  </tr>
</table>
 
</body> 
</html> 

<?php

}
el resultado de ese codigo es este http://www.porneia.com.ve/relatos/masivo.php

luego esa informacion que resulta de esa funcion, osea el html que ven en el link quiero meterlo en la funcion mail.

hice algo como esto:
Código PHP:
$destinatario "[email protected]"
$asunto "Tus relatos eroticos de la semana"
$cuerpo cuerpo(2);

$headers "MIME-Version: 1.0\r\n"
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"
$headers .= "From: Boletin www.porneia.com.ve <[email protected]>\r\n"


mail($destinatario,$asunto,$cuerpo,$headers
y no funciona.

si hago esto:

Código PHP:
mail($destinatario,$asunto,$cuerpo(2),$headers
intentando colocaf dentro de la funcion mail() la funcion que me genera el html y no funciona. incluso ni manda el correo.

espero que alguien me pueda ayudar. gracias.