Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/11/2004, 11:26
Rossita_Rave
 
Fecha de Ingreso: noviembre-2004
Mensajes: 2
Antigüedad: 19 años, 4 meses
Puntos: 0
Sonrisa Problemas con envio de e-mail.

tengo 2 archivos un es enviar.php y contactenos.php ya logre validad pero no me llega el email.......q hago help me please gracias :)

enviar.php
<?php

$nombre=$_POST['nombre'];
$apellido=$_POST['apellido'];
$mailusu=$_POST['mailusu'];
$dominio=$_POST['dominio'];
$telf=$_POST['telf'];
$empresa=$_POST['empresa'];
$asunto=$_POST['asunto'];
$mensaje=$_POST['mensaje'];

$nombre=trim($nombre);
$apellido=trim(str_replace(" ","%20",$apellido));
$mailusu=trim($mailusu);
$dominio=trim($dominio);
$asunto=trim(str_replace(" ","%20",$asunto));
$mensaje=trim(str_replace(" ","%20",$mensaje));
$telf=trim(str_replace(" ","%20",$telf));
$empresa=trim(str_replace(" ","%20",$empresa));

if ($nombre=="" || $apellido=="" || $mailusu=="" || $dominio=="" || $asunto=="" || $mensaje=="" )
{
if($nombre==""){$nombre="s";}
if($apellido==""){$apellido="s";}
if($mailusu==""){$mailusu="s";}
if($dominio==""){$dominio="s";}
if($asunto==""){$asunto="s";}
if($mensaje==""){$mensaje="s";}
header("Location: ../Inicio.php?nom=".$nombre."&ape=".$apellido."&mail= ".$mailusu."&dom=".$dominio."&asu=".$asunto."&men= ".$mensaje."&tel=".$telf."&emp=".$empresa);
}
else
{
$apellido=trim(str_replace("%20"," ",$apellido));
$asunto=trim(str_replace("%20"," ",$asunto));
$mensaje=trim(str_replace("%20"," ",$mensaje));
$telf=trim(str_replace("%20"," ",$telf));
$empresa=trim(str_replace("%20"," ",$empresa));

$message="Nombre contacto : ".$nombre." ".$apellido."<br>
E-Mail : ".$mailusu."@".$dominio."<br>
Telefono : ".$telf."<br>
Empresa : ".$empresa."<br>
Asunto : ".$asunto."<br>
Mensaje : ".$mensaje."<br><br><br><br>";

$sfrom="Formulario Contacto Copemi";
$sdestinatario="[email protected]";
$ssubject="Nuevo contacto Copemi";
$shtml=$message;
$sheader="From:".$sfrom."\nReply-To:".$sfrom."\n";
$sheader=$sheader."X-Mailer:PHP/".phpversion()."\n";
$sheader=$sheader."Mime-Version: 1.0\n";
$sheader=$sheader."Content-Type: text/html";
mail($sdestinatario,$ssubject,$shtml,$sheader);

if (mail)
{
header("Location: contactenos.php?n=1"); }

else{header("Location: contactenos.php?n=2");}
}
?>
-------------------------------------------------------------

contactenos.php

<style type="text/css">
<!--
.style7 {
color: #E9E7E2;
font-weight:normal;
font-size: 17px;
}
.style8 {
font-size:12px;
color:#E03F22;
LINE-HEIGHT: 10pt;
FONT-STYLE: normal;
font-family: tahoma, arial, helvetica, sans-serif;
font-weight:bold;
text-decoration:none
}
-->
</style>
<body bgcolor="#3d74b3">
<tr>
<td height="38" valign="top" colspan="2"><img src="../images/titulos_contactenos.gif" width="540" height="35"></td>
</tr>
<tr>
<td height="400" valign="top" bgcolor="E9E7E2" >
<table cellspacing="15" >
<tr >
<td bgcolor="#CBBEB7" valign="middle" width="780" height="55" align="center" class="explicabold">
Lima, Calle 2 #630 Monterrico Norte, San Borja<br>
Telefax: (01)436-7578 Telf: 436-4434

</td>
</tr>
</table>

<table cellspacing="15" cellpadding="0" border="0">
<tr><td height="40" class="explica"><font face="Arial, Helvetica, sans-serif" color="#FFFFFF" size="2"><p class="contactTit">Copemi Contacto:</p>
Gracias por su interes en los Equipos de Copemi.
</font></td></tr>
<tr>
<td bgcolor="#DAD0CB" width="780" height="200" align="center" valign="top">
<form name="formulario" action="enviar.php" method="post">
<table width="100%">

<tr>
<td bgcolor="#897163" colspan="3" align="center" height="24"><span class="style7">Acerca de Usted</span></td>
</tr>
<tr><td width="35"></td><td width="91" height="25" class="items" >&nbsp;</td><td width="621"></td></tr>
<tr><td></td><td class="items" height="25">Nombre:</td><td align="left" class="requerido"><input <?php if ($nom=="s"){echo "class='text'";}else{ echo "value='".$nom."'";} ?> id="nombre" name="nombre" type="text" maxlength="200">&nbsp;&nbsp;** </td>
</tr>
<tr><td></td><td class="items" height="25">Apellido:</td><td class="requerido"><input <?php if ($ape=="s"){echo "class='text'";}else{ echo "value='".$ape."'";} ?> id="apellido" name="apellido" type="text" maxlength="200">&nbsp;&nbsp;** </td></tr>
<tr><td></td><td class="items" height="25">E-mail:</td><td class="itemsarroba"><input <?php if ($mail=="s"){echo "class='text'";}else{ echo "value='".$mail."'";} ?> id="mailusu" name="mailusu" type="text" maxlength="50">&nbsp;@&nbsp;<input <?php if ($dom=="s"){echo "class='text'";}else{ echo "value='".$dom."'";} ?> name="dominio" type="text" maxlength="50">&nbsp;&nbsp;<span class="style8">** </span></td>
</tr>
<tr><td></td><td class="items" height="25">Tel&eacute;fono:</td><td class="requerido"><input id="telf" name="telf" type="text" maxlength="50" <?php if ($tel!=""){echo "value='".$tel."'";} ?>>&nbsp;&nbsp;</td></tr>
<tr><td></td><td class="items" height="25">Empresa:</td><td class="requerido"><input id="empresa" name="empresa" type="text" maxlength="200" <?php if ($emp!=""){echo "value='".$emp."'";} ?>>&nbsp;&nbsp;</td></tr>
<tr><td></td><td class="items" height="25"></td><td></td></tr>
<tr>
<td bgcolor="#897163" colspan="3" align="center" height="24"><span class="style7">Mensaje</span></td>
</tr>
<tr><td></td><td class="items" height="25">&nbsp;</td><td></td></tr>
<tr><td></td><td class="items" height="25">Asunto <br>Mensaje:</td><td class="requerido"><input <?php if ($asu=="s"){echo "class='text'";}else{ echo "value='".$asu."'";} ?> id="asunto" name="asunto" type="text" size="46" maxlength="200">&nbsp;&nbsp;**</td></tr>
<tr><td></td><td class="items" height="25">Mensaje: <br><span class="itemslight">(Preguntas, <br>comentarios)</span></td><td class="requerido"><textarea id="mensaje" name="mensaje" rows="7" cols="35" <?php if ($men=="s"){echo "class='text'>";}else{ echo ">".$men;} ?> </textarea>&nbsp;&nbsp;**</td></tr>
<tr><td></td><td class="items" height="25">&nbsp;</td><td></td></tr>
<tr><td></td><td class="items" height="25" ><input type="submit" value="Enviar Mensaje"></td><td class="requerido" align="center">&nbsp;&nbsp;** campos requeridos </td></tr>

</table>

</form>
</td>
</tr>
</table>
</td>
</tr>
<?php if($_GET['n']==1){?>
<script language="javascript">alert ("Su mensaje fue enviado con exito")</script>
<?php }elseif($_GET['n']==2){?>
<script language="javascript">alert ("Hubo un error. Su mensaje no pudo ser enviado. Revise los campos requeridos")</script>
<?php }?>
-----------------------------------
como hago para q me llegue??

plizzzzzz..help me!!

Última edición por Cluster; 29/11/2004 a las 13:46