Hola, por aki en mi pc encontre este viejo script y lo kise modifike unpoco para agregarle unos campos, habr si me pueden decir por ke no envia los mails
maileame.php
Código PHP:
<form method="POST" action="enviado.php">
<head>
<title>jaime te Atiende</title>
<style type="text/css">
<!--
body {
background-color:#FFFFFF
}
td {
background-color:#FFFFFF;
}
input, select, textarea {
background-color: #FFFFCC;
border: #009900 1px solid;
font-size:10px
}
a:link, a:visited {
color:#FFFFFF;
font-weight:bold;
text-decoration: none;
}
a:hover {
text-decoration:underline;
}
-->
</style>
</head>
<body bgcolor="fff">
<p><b><font style="font-size:12px; font-family:Arial, Helvetica, sans-serif"></font></b></p>
<div align="center">
<center>
<table border="0" width="400px" cellspacing="0" cellpadding="0" height="223">
<tr>
<td width="100%" bgcolor="fff" height="223">
<table border="0" width="100%" cellspacing="1" cellpadding="0" height="103">
<tr>
<td width="28%" bgcolor="#fff" height="25">
<p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Nombre: </font></td>
<td width="72%" bgcolor="#fff" height="25"> <input type="text" name="nombre" size="60"></td>
</tr>
<tr>
<td width="28%" bgcolor="#fff" height="25">
<p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">E-mail: </font></td>
<td width="72%" bgcolor="#fff" height="25"> <input type="text" name="email" size="60" ></td>
</tr>
<tr>
<td width="28%" bgcolor="#fff" height="25">
<p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Direccion: </font></td>
<td width="72%" bgcolor="#fff" height="25"> <input type="text" name="direccion" size="60"></td>
</tr>
<tr>
<td width="28%" bgcolor="#fff" height="25">
<p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Telefono: </font></td>
<td width="72%" bgcolor="#fff" height="25"> <input type="text" name="telefono" size="60" ></td>
</tr>
<tr>
<td width="28%" bgcolor="#fff" height="25">
<p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Ciudad: </font></td>
<td width="72%" bgcolor="#fff" height="25"> <input type="text" name="ciudad" size="60" ></td>
</tr>
<tr>
<td width="28%" bgcolor="#fff" height="25">
<p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Estado: </font></td>
<td width="72%" bgcolor="#fff" height="25"> <input type="text" name="estado" size="60" ></td>
</tr>
<tr>
<td width="28%" bgcolor="#fff" height="25">
<p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Asunto: </font></td>
<td width="72%" bgcolor="#fff" height="25">
<select size="1" name="asunto" >
<option selected>Seleccione</option>
<option>Peticiones</option>
<option>Quejas</option>
<option>Sugerencias</option>
<option>Otros..</option>
</select></td>
</tr>
<tr>
<td width="28%" bgcolor="#fff" height="56">
<p align="right"><font style=" font-size:12px;font-family:Arial, Helvetica, sans-serif">Mensaje: </font></td>
<td width="72%" bgcolor="#fff" height="56"> <textarea rows="10" name="mensaje" cols="55" ></textarea></td>
</tr>
<tr>
<td width="28%" bgcolor="#fff" height="43"> </td>
<td width="72%" bgcolor="#fff" height="43"> <input type="submit" value="Enviar" name="enviar">
<input type="reset" value="Borrar" name="borrar"></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
</form>
enviado.php
Código PHP:
<?php
//E-mail en donde se recibirá el Formulario.
$recipiente = "j;
//URL de tu Sitio Web.
$sw = "";
//Mensaje que te llegará al Correo, con los datos ingresados.
$msg = "El Sr/Sra $nombre, se desea poner en contacto con usted, y envia el siguiente mensaje con los siguientes datos:nnn
Nombre: $nombre
Email: $email
Direccion: $direccion
Telefono: $telefono
Ciudad: $ciudad
Estado: $estado
Asunto: $asunto
Mensaje: $mensajenn";
//Comprobamos que los campos del formulario se encuentren completos.
if (empty($nombre)){
echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
ingresado tu Nombre.</b></font></p>";
}
if(empty($email)){
echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
ingresado tu E-mail.</b></font></p>";
}
if(empty($direccion)){
echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
seleccionado una direccion.</b></font></p>";
}
if(empty($telefono)){
echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
seleccionado un telefono.</b></font></p>";
}
if(empty($ciuadad)){
echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
seleccionado una ciudad.</b></font></p>";
}
if(empty($estado)){
echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
seleccionado un estado.</b></font></p>";
}
if(empty($asunto)){
echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
seleccionado un Asunto.</b></font></p>";
}
if(empty($mensaje)){
echo "<p align=center><font face=tahoma size=2><b><font color=#FF0000>Error:</font> No has
ingresado el Mensaje.</b></font></p>";
}else{
//Limpiamos de posibles ataques.
$mensaje = ereg_replace("rn","<br>", $mensaje);
$nombre = htmlentities($nombre);
$email = htmlentities($email);
$direccion = htmlentities($direccion);
$telefono = htmlentities($telefono);
$ciudad = htmlentities($ciudad);
$estado = htmlentities($estado);
$asunto = htmlentities($asunto);
$mensaje = htmlentities($mensaje);
//Enviamos el E-mail con todos los datos.
mail("$recipiente", "$asunto", "$msg", "FROM: $email");
//Damos las gracias al visitante por contactarnos.
echo"<font face=tahoma size=2>
<p align=center>Gracias <b>$nombre</b>.
<p align=center>Tu Mensaje ha sido enviado con exito!<br>
<br>
<b>G r a c i a s !</b><br>
<br>
<br>
</p>
<p align=center><br>
<a href='http://www.pagina.org/inicio/' target='_top'>Regresar a la Pagina Principal</a>.</p>";
}
?>