Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/11/2010, 05:25
xerifandtomas
 
Fecha de Ingreso: octubre-2010
Ubicación: España
Mensajes: 1.007
Antigüedad: 14 años, 3 meses
Puntos: 123
De acuerdo Respuesta: guardar archivo.html desde.php

Cita:
Iniciado por chemon Ver Mensaje
Yo lo que suelo hacer es guardar todo lo que envío mediante mail en una variable
$mensaje = "Registros encontrados:" . $numero;
$mensaje .= "<br /><table ....";

y luego creo las cabeceras que adjunto a mail()
$header = "Content-type: text/html";

mail("dir@pep,es", "asunto", $mensaje, $header);

Espero que esto te ayude

Un saludo
Gracias nuevamente por vuestro aporte, ya tengo lo que queria,
el codigo qudaria algo asi:
Código PHP:
if(isset($_POST ['fec'])){$mensaje ='Fecha de Insercion: <b>'.$_POST ['fec'].'</b>';$f=$_POST ['fec'];}

$mensaje.=' Registros encontrados: '.$numero;
//****************GENERO TABLA*****************************
$mensaje.='<br><table border="1">';
$mensaje.='<tr><td align="center">REMEDY</td><td align="center">MANTENEDOR</td><td align="center">CIERRE</td><td align="center">ROUTER NUEVO</td><td align="center">ROUTER VIEJO</td><td align="center">DESCRIPCION</td></tr>';
while(
$row mysql_fetch_array($sql)){
$mensaje.='<tr border="1"><td>'.$row ['rem'].'</td><td>'.$row ['man'].'</td><td>'.$row['cie'].'</td><td width="180">'.$row['rou'].'</td><td>'.$row['rou1'].'</td><td>'.$row['des'].'</td></tr>';

};
$mensaje.='</table>';
//****************GENERO TABLA*****************************

//*******************GENERO ARCHIVO************************
$titulo$f.'_'.$_SESSION['usu'].'.html';//titulo de archivo
$html fopen "tablas/$titulo"'w+' );//abro o genero archivo *ruta relativa
fwrite ($html$mensaje);//escribo el contenido
fclose($html);//cierro el archivo
//*******************GENERO ARCHIVO************************ 
Como no me interesa que el servidor me envie el correo creo que esto es lo mas adecuado, si alguuien ve alguna mejora o error, digamelo, gracias