Ver Mensaje Individual
  #11 (permalink)  
Antiguo 12/12/2008, 22:39
fiorella_liz
 
Fecha de Ingreso: noviembre-2008
Ubicación: lima
Mensajes: 148
Antigüedad: 15 años, 5 meses
Puntos: 0
Respuesta: problema con envio de mail

Hola mx35, estuve viendo tu codigo y pues aqui le hice unas modificaciones.
Este es tu formulario

Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<
title>Documento sin t&iacute;tulo</title>
</
head>

<
body>
 <
form action="gestor.php" method="post">
    <
class="Estilo2">*Nombre y Apellido/Empresa:</p>
    <
p><span id="sprytextfield1">
      <
label>
      <
input name="nombre" type="text" id="nombre" size="50" maxlength="50" />
      </
label>
    <
span class="textfieldRequiredMsg">Se necesita un valor.</span></span></p>
    <
p><span id="sprytextfield2">
      <
label></label>
    <
span class="textfieldRequiredMsg">Se necesita un valor.</span></span></p>
    <
class="Estilo2">*Telefono:</p>
    <
class="Estilo2"><span id="sprytextfield3">
      <
label>
      <
input name="telefono" type="text" id="telefono" size="50" maxlength="50" />
      </
label>
    <
span class="textfieldRequiredMsg">Se necesita un valor.</span></span></p>
    <
class="Estilo2">*Correo electrónico:</p>
    <
class="Estilo2"><span id="sprytextfield6">
      <
label>
      <
input name="email" type="text" id="email" size="50" maxlength="50" />
      </
label>
    <
span class="textfieldRequiredMsg">Se necesita un valor.</span></span></p>
    <
class="Estilo2">*Marca:</p>
    <
class="Estilo2"><span id="spryselect1">
      <
label>
      <
select name="marca" id="marca">
        <
option value="Mitsubishi">Mitsubishi</option>
        <
option value="Honda">Honda</option>
        <
option value="Nissan">Nissan</option>
        <
option value="Hyundai">Hyundai</option>
            </
select>
      </
label>
    <
span class="selectRequiredMsg">Seleccione un elemento.</span></span></p>
    <
class="Estilo2">*Modelo:</p>
    <
class="Estilo2"><span id="sprytextfield4">
      <
label>
      <
input name="modelo" type="text" id="modelo" size="50" maxlength="50" />
      </
label>
    <
span class="textfieldRequiredMsg">Se necesita un valor.</span></span></p>
    <
class="Estilo2">*Año: </p>
    <
class="Estilo2"><span id="sprytextfield5">
      <
label>
      <
input type="text" name="ano" id="ano" />
      </
label>
    <
span class="textfieldRequiredMsg">Se necesita un valor.</span></span></p>
    <
class="Estilo2">*Descripción del RepuestoEjemploamortiguador delantero derechkit de carburadoretc. :</p>
    <
class="Estilo2"><span id="sprytextarea1">
      <
label>
      <
textarea name="textarea1" id="textarea1" cols="45" rows="5"></textarea>
      </
label>
    <
span class="textareaRequiredMsg">Se necesita un valor.</span></span></p>
    <
class="Estilo2">
      <
label>
      <
input type="submit" name="button" id="button" value="Enviar" />
      </
label>
      <
label>
      <
input type="reset" name="button2" id="button2" value="Restablecer" />
      </
label>
    </
p>
    <
class="Estilo2">*Campos obligatorios.</p>
</
form>
  </
body>
</
html

Y aqui el gestor.php que envia el correo, lo probe y me funciono de maravillas


Código PHP:
import_request_variables("GP");


$EmailMensaje="Formulario de contacto<br>Nombre: ".$_POST['nombre']."<br>Telefono: ".$_POST['telefono']."<br>Email: ".$_POST['email']."<br>Marca: ".$_POST['marca']."<br>Modelo: ".$_POST['modelo']."<br>A&Ntilde;O: ".$_POST['ano']."<br>Descripcion: ".$_POST['textarea1']."";


$subject "Prueba d Envio";
$headers="MIME-Version: 1.0\r\n";
$headers.="Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: TUNOMBRE <[email protected]>\r\n"

mail("[email protected]",$subject,$EMailMensaje,$headers); 


Suerte

Última edición por fiorella_liz; 12/12/2008 a las 22:47