Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/08/2004, 10:03
juan007
 
Fecha de Ingreso: marzo-2004
Ubicación: Chile
Mensajes: 382
Antigüedad: 20 años, 1 mes
Puntos: 0
problemas con email

Hola compañeros baje un script de contacto desde una web, el prblema me radica en que al recibir el email me aparece el script osea me envia el script con los datos, y lo que deseo son los datos.

Algo asi que llege al correo:

Nombre: xxxx yyyy
Email: [email protected]
Motivo: Cualquier motivo
Mensaje: prueba de correo

Pero aparece esto, al abrir el correo

<html>
<center><table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse"
bordercolor="#C5BFBF" width="435" id="AutoNumber1" height="1">
<tr>
<td width="100%" height="1">
<center><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"
bordercolor="#111111" width="42%" id="AutoNumber1">
<tr>
<td width="1%">&nbsp;</td>
<td width="98%">&nbsp;</td>
<td width="1%" rowspan="8">&nbsp;</td>
</tr>
<tr>
<td width="1%">&nbsp;</td>
<td width="98%">
<p align="center"><b>Mensaje enviado desde el método de contacto</b></td>
</tr>
<tr>
<td width="1%">&nbsp;</td>
<td width="98%">&nbsp;</td>
</tr>
<tr>
<td width="1%">&nbsp;</td>
<td width="98%">
<p align="center">Ha recibido un mensaje de un usuario utilizando el método
de contacto.</td>
</tr>
<tr>
<td width="1%">&nbsp;</td>
<td width="98%">&nbsp;</td>
</tr>
<tr>
<td width="1%">&nbsp;</td>
<td width="98%" rowspan="2">
<center><table border="0" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" bordercolor="#111111" width="266" id="AutoNumber2">
<tr>
<td width="64"><b>Nombre:</b></td>
<td width="4">&nbsp;</td>
<td width="124">Juan Pablo</td>
<td width="74">&nbsp;</td>
</tr>
<tr>
<td width="64"><b>E-mail:</b></td>
<td width="4">&nbsp;</td>
<td width="124">[email protected]</td>
<td width="74">&nbsp;</td>
</tr>
<tr>
<td width="64"><b>Motivo:</b></td>
<td width="4">&nbsp;</td>
<td width="124">critica</td>
<td width="74">&nbsp;</td>
</tr>
<tr>
<td width="64"><b>Mensaje:</b></td>
<td width="4">&nbsp;</td>
<td width="198" colspan="2">&nbsp;</td>
</tr>
<tr>
<td width="64" rowspan="3">&nbsp;</td>
<td width="198" colspan="2" rowspan="3">dfgfdh</td>
</tr>
<tr>
<td width="4">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="1%">&nbsp;</td>
</tr>
<tr>
<td width="1%">&nbsp;</td>
<td width="98%">&nbsp;</td>
</tr>
</table></center>
</td>
</tr>
</table></center>

</hmtl>

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
y el script entero es este:enviar.php

<?php

/**********************************************/
/* Si no sabeis que modificar leeros los */
/* mensajes de ayuda que van despues de // */
/* */
/**********************************************/

//Email receptor ( El email que recibirá los mensajes enviados desde el formulario )
$remail = "[email protected]";

//Asunto ( Tópico que informa sobre que trata el email )
$reasunto = "Contacto desde la web";

/*
Email emisor ( Este será el email que aparecerá como emisor de los emails, es decir, el que enviara los emails)
Atención: El email puede ser inventado, sin necesidad de poseer su contraseña o cualquier dominio del el mismo
por lo cual podeis inventarlo. Ej: [email protected] <-- Este email funcionaria, aunque
no tengais ningun poder sobre el ;)
*/


$reemisor = $_POST['mail'];



////////////////////////////////////////////////
//No modifiques nada apartir de esta linea
////////////////////////////////////////////////

$enombre = $_POST['nomb'];
$eemail = $_POST['mail'];
$emotivo = $_POST['motiv'];
$emensaje = $_POST['txt'];
$error = "error.php";

if (empty($enombre)) { echo "<script> location.href=\"$error&e=n\" </script>"; }
elseif (empty($eemail)) { echo "<script> location.href=\"$error&e=e\" </script>"; }
elseif (empty($emensaje)) { echo "<script> location.href=\"$error&e=m\" </script>"; }
else
{


$msnj = "
<html>
<center><table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#C5BFBF\" width=\"435\" id=\"AutoNumber1\" height=\"1\">
<tr>
<td width=\"100%\" height=\"1\">
<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"42%\" id=\"AutoNumber1\">
<tr>
<td width=\"1%\">&nbsp;</td>
<td width=\"98%\">&nbsp;</td>
<td width=\"1%\" rowspan=\"8\">&nbsp;</td>
</tr>
<tr>
<td width=\"1%\">&nbsp;</td>
<td width=\"98%\">
<p align=\"center\"><b>Mensaje enviado desde el método de contacto</b></td>
</tr>
<tr>
<td width=\"1%\">&nbsp;</td>
<td width=\"98%\">&nbsp;</td>
</tr>
<tr>
<td width=\"1%\">&nbsp;</td>
<td width=\"98%\">
<p align=\"center\">Ha recibido un mensaje de un usuario utilizando el método
de contacto.</td>
</tr>
<tr>
<td width=\"1%\">&nbsp;</td>
<td width=\"98%\">&nbsp;</td>
</tr>
<tr>
<td width=\"1%\">&nbsp;</td>
<td width=\"98%\" rowspan=\"2\">
<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"266\" id=\"AutoNumber2\">
<tr>
<td width=\"64\"><b>Nombre:</b></td>
<td width=\"4\">&nbsp;</td>
<td width=\"124\">$enombre</td>
<td width=\"74\">&nbsp;</td>
</tr>
<tr>
<td width=\"64\"><b>E-mail:</b></td>
<td width=\"4\">&nbsp;</td>
<td width=\"124\">$eemail</td>
<td width=\"74\">&nbsp;</td>
</tr>
<tr>
<td width=\"64\"><b>Motivo:</b></td>
<td width=\"4\">&nbsp;</td>
<td width=\"124\">$emotivo</td>
<td width=\"74\">&nbsp;</td>
</tr>
<tr>
<td width=\"64\"><b>Mensaje:</b></td>
<td width=\"4\">&nbsp;</td>
<td width=\"198\" colspan=\"2\">&nbsp;</td>
</tr>
<tr>
<td width=\"64\" rowspan=\"3\">&nbsp;</td>
<td width=\"198\" colspan=\"2\" rowspan=\"3\">$emensaje</td>
</tr>
<tr>
<td width=\"4\">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width=\"1%\">&nbsp;</td>
</tr>
<tr>
<td width=\"1%\">&nbsp;</td>
<td width=\"98%\">&nbsp;</td>
</tr>
</table></center>
</td>
</tr>
</table></center>

</hmtl>";


mail($remail,$reasunto,$msnj,"From: $reemisor<$reemisor>\n\r");

}
echo "<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#C5BFBF\" width=\"435\" id=\"AutoNumber1\" height=\"1\">
<tr>
<td width=\"100%\" height=\"1\"><br><center><font face='verdana' size='2' color='#FF0000'>Se ha enviado el mensaje satisfactoriamente</font></center><br></td>
</tr>
</table>";

?>

Bueno ojala que me puedan ayudar.

De antemano se agradece.

Última edición por juan007; 30/08/2004 a las 10:08 Razón: falto especificar algo