Foros del Web » Programando para Internet » PHP »

alguien me ayuda con este mailer

Estas en el tema de alguien me ayuda con este mailer en el foro de PHP en Foros del Web. 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 ...
  #1 (permalink)  
Antiguo 04/10/2006, 19:17
 
Fecha de Ingreso: octubre-2005
Mensajes: 419
Antigüedad: 18 años, 5 meses
Puntos: 0
alguien me ayuda con este mailer

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;
}

inputselecttextarea {
background-color#FFFFCC;
border#009900 1px solid;
font-size:10px
}

a:linka:visited {
color:#FFFFFF;
font-weight:bold;
text-decorationnone;
}

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:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;<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:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;<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:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;<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:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;<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:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;<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:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;<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:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="25">&nbsp;
                                                  <
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:&nbsp;&nbsp;</font></td>
                                                <
td width="72%" bgcolor="#fff" height="56">&nbsp;<textarea rows="10" name="mensaje" cols="55" ></textarea></td>
                                              </
tr>
                                              <
tr>
                                                <
td width="28%" bgcolor="#fff" height="43">&nbsp;</td>
                                                <
td width="72%" bgcolor="#fff" height="43">&nbsp;<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 $nombrese desea poner en contacto con ustedy 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>";
}
?>
__________________
GraficasWeb.com / Diseño y Desarrollo Web en Mexico
info @ graficasweb.com E-mail / MSN

Última edición por SICK-BOY; 19/10/2006 a las 14:39
  #2 (permalink)  
Antiguo 04/10/2006, 20:44
 
Fecha de Ingreso: septiembre-2006
Ubicación: Buenos Aires
Mensajes: 125
Antigüedad: 17 años, 7 meses
Puntos: 0
Hola :

lo mire un poco no decis si te envia un error.
lo que veo es que usas variables globales.
tengo entendido que los hosting hoy por hoy las suelen tener desactivadas.

tenes que usar $_POST['variable'] en vez de $variable.

no se si puede andar por ahi tu problema.
Si no proba la funcion mail poniendole los datos vos a mano.(puede estar desactivada)
  #3 (permalink)  
Antiguo 05/10/2006, 05:53
 
Fecha de Ingreso: agosto-2006
Ubicación: Barcelona,España
Mensajes: 54
Antigüedad: 17 años, 7 meses
Puntos: 0
En efecto, le faltaria poner $_POST['variable'].
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:05.