Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/12/2004, 21:43
jose2003
 
Fecha de Ingreso: noviembre-2004
Mensajes: 35
Antigüedad: 19 años, 4 meses
Puntos: 1
En que estoy fallando? (envio de mail)

Hola me gustaria que me digan en que estoy fallando ya que el envio de mail es perfecto pero como veran lo estoy mandando en html y cunado me llega el mensaje no me pone los datos del formulario, no se si me expreso bien pero mi intencion es recibir un mail en formato html que tenga los datos del formulario que llenaron los usuarios.Desde ya gracias

<?
$mensaje = "";
if (isset($_POST["Enviar"])){
if(empty($_POST[Dominio])){
$mensaje .= "Debes escribir un Dominio.<br>";
}
if(empty($_POST[Estado])){
$mensaje .= "Debes escribir el estado del Dominio.<br>";
}
if(empty($_POST[Nombre])){
$mensaje .= "Debes escribir un Nombre.<br>";
}
if(empty($_POST[Apellido])){
$mensaje .= "Debes escribir un Apellido.<br>";
}
if(empty($_POST[Tipo])){
$mensaje .= "Debes escribir el tipo de Documento.<br>";
}
if(empty($_POST[Numero])){
$mensaje .= "Debes escribir el nuemro de Documento.<br>";
}
if(empty($_POST[Email])){
$mensaje .= "Debes escribir un Email.<br>";
}
if(empty($_POST[Cod])){
$mensaje .= "Debes escribir el codigo de area.<br>";
}
if(empty($_POST[Telefono])){
$mensaje .= "Debes escribir un numero de Telefono.<br>";
}
if(empty($_POST[Direccion])){
$mensaje .= "Debes escribir tu domicilio.<br>";
}
if(empty($_POST[Localidad])){
$mensaje .= "Debes escribir la Localidad.<br>";
}
if(empty($_POST[Provincia])){
$mensaje .= "Debes escribir la Provincia.<br>";
}
if(empty($_POST[Codigopostal])){
$mensaje .= "Debes escribir el Codigo Postal.<br>";
}
if(empty($_POST[Pais])){
$mensaje .= "Debes seleccionar el Pais.<br>";
}
if(empty($_POST[Servicio])){
$mensaje .= "Debes seleccionar el tipo de Servicio.<br>";
}
if(empty($_POST[Formapago])){
$mensaje .= "Debes seleccionar el plazo de pago.<br>";
}
if(empty($_POST[Origen])){
$mensaje .= "Debes seleccionar como nos conociste.<br>";
}
if(empty($_POST[acepto])){
$mensaje .= "Debes aceptar los terminos y condiciones de Servicio.<br>";
}
if ($mensaje != ""){
echo "SE HAN PRODUCIDO LOS SIGUIENTES ERRORES:<br>".$mensaje;
echo "<input TYPE=\"button\" VALUE=\" ATRÁS\" onClick=\"history.go(-1)\">";
exit;
}
}
?>
<?php
/* mensaje */
$mensaje = '
<html>
<head>
<title>Contrato de servicio</title>
</head>
<body>
<table width="600" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="226" height="73" valign="top"><div align="left"><img src="/Imagen/logo_panel.jpg" width="225" height="73"></div></td>
<td width="374" align="right" valign="middle"><BR> <p><strong><font color="#000099" size="+1">CONTRATO
DE SERVICIO</font></strong><font color="#000099">&nbsp;</font></p></td>
</tr>
<tr>
<td height="20" colspan="2" valign="top"> <hr color="#000099" width="600" size="2" noshade>
</td>
</tr>
<tr>
<td height="557" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="10">
<!--DWLayoutTable-->
<tr>
<td width="580" height="228" valign="top"> <p><font size="2"> <font color="#000000"><font size="3">
. $_POST["Apellido"] ["Nombre"]. "(" . $_POST["Empresa].")" <br>"\n";
. $_POST["Tipo"] ["Numero"] . <br> "\n";
. $_POST["Direccion"] . "\n";<br>
. $_POST["Codigopostal"] ["Localidad"] . "\n";<br>
. $_POST["Provincia"] ["Pais"] . "\n";<br>
<br>
"Teléfono:" . $_POST["Cod"] ["Telefono"] . "\n";<br>
"Celular:" . $_POST["Cod"] . &quot;15 - &quot; . $_POST["Celular"]
. "\n";<br>
"E-mail:" . $_POST["Email"] . "\n";<br>
"E-mail2:" . $_POST["Email2"] . "\n";</font></font></font></p>
<p><font color="#000000" size="3">***************************************** *******************************</font></p></td>
</tr>
<tr>
<td height="309" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="105" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<!--DWLayoutTable-->
<tr>
<td width="155" height="25" valign="middle" bgcolor="#AAE3FF">&nbsp;Nombre
del Dominio:</td>
<td width="422" valign="middle" bgcolor="#FFFFFF">&nbsp;
"www.". $_POST["Dominio"] . "\n"; </td>
</tr>
<tr>
<td height="25" valign="middle" bgcolor="#AAE3FF">&nbsp;Estado
de mismo:</td>
<td valign="middle" bgcolor="#FFFFFF">&nbsp;. $_POST["Estado"]
. "\n";</td>
</tr>
<tr>
<td height="25" valign="middle" bgcolor="#AAE3FF">&nbsp;Servicio
contratado:</td>
<td valign="middle" bgcolor="#FFFFFF">&nbsp;. $_POST["Servicio"]
. "\n";</td>
</tr>
<tr>
<td height="25" valign="middle" bgcolor="#AAE3FF">&nbsp;Plazo
de pago:</td>
<td valign="middle" bgcolor="#FFFFFF">&nbsp;. $_POST["Formapago"]
. "\n";</td>
</tr>
</table></td>
</tr>
<tr>
<td width="154" height="53" align="right" valign="middle">&nbsp;.
$_POST["acepto"] . "\n";</td>
<td width="426" valign="middle">&nbsp;Declaro y acepto haber leido
los Terminos y condiciones de Servicio</td>
</tr>
<tr valign="middle">
<td height="126" colspan="2">. $_POST["Comentarios"] . "\n";</td>
</tr>
<tr valign="middle">
<td height="25" colspan="2">&nbsp;Los conoci por . $_POST["Origeno"]
. "\n";</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
';
$to = "info@tupagina";
$subject = "Servicio de Internet contratado por: $Apellido, $Nombre";
$mailheader = "MIME-Version: 1.0 \r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1 \r\n";
$mailheader .= "From: Apache {$_SERVER['SERVER_ADMIN']} \r\n";
$mailheader .= "Return-path: $Email \r\n";
$mailheader .= "X-Priority: 1 \r\n";
$mailheader .= "X-MSMail-Priority: High \r\n";
$mailheader .= "X-Mailer: PHP/".phpversion()." \n";
if (mail ($to,$subject,$mensaje,$mailheader))
{
header("Location:gracias.php");
exit;
} else {
header("Location:error.php");
exit;
}

?>