Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/02/2008, 14:18
AJDC
 
Fecha de Ingreso: agosto-2003
Mensajes: 324
Antigüedad: 20 años, 9 meses
Puntos: 1
Problema con envío de correo desde formulario

Saludos.
Tengo un formulario (html), desde donde, después de rellenar una serie de campos, llama a un php, al que le pasa las variables, para que éste envíe un correo con los datos en cuestión.
Bien ... pues el problema está en que no me lo envía, no lo he podido probar, ya que lo ue me hace el nacehagor es preguntarme si me lo quiero guardar en disco o abrir (me refiero al archivo php), y si le digo abrir, me ejecuta el Dreamweaver ...

¿Qué estoy haciendo mal?
Os pongo los códigos...

- El formulario....
Código HTML:
<form name="stecnico" ACTION="stecnicoemail.php" METHOD="GET">
                                <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                  <tr valign="middle">
                                    <td width="30" height="20">&nbsp;</td>
                                    <td width="175" height="20" class="ParrafoAzul">APELLIDOS
                                      Y NOMBRE </td>
                                    <td height="20"><input name="nombre" type="text" id="nombre" size="50"></td>
                                  </tr>
                                  <tr valign="middle">
                                    <td height="4">&nbsp;</td>
                                    <td height="4" class="ParrafoAzul">&nbsp;</td>
                                    <td height="4">&nbsp;</td>
                                  </tr>
                                  <tr valign="middle">
                                    <td width="30" height="20">&nbsp;</td>
                                    <td width="175" height="20" class="ParrafoAzul">DIRECCI&Oacute;N
                                      Y TELF. </td>
                                    <td height="20"><input name="direccion" type="text" id="direccion" size="50"></td>
                                  </tr>
                                  <tr valign="middle">
                                    <td height="4">&nbsp;</td>
                                    <td height="4" class="ParrafoAzul">&nbsp;</td>
                                    <td height="4">&nbsp;</td>
                                  </tr>
                                  <tr valign="middle">
                                    <td width="30" height="20">&nbsp;</td>
                                    <td width="175" height="20" class="ParrafoAzul">CORREO
                                      ELECTR&Oacute;NICO</td>
                                    <td height="20"><input name="correo" type="text" id="correo" size="50"></td>
                                  </tr>
                                  <tr valign="middle">
                                    <td height="4">&nbsp;</td>
                                    <td height="4" class="ParrafoAzul">&nbsp;</td>
                                    <td height="4">&nbsp;</td>
                                  </tr>
                                  <tr valign="middle">
                                    <td width="30" height="20">&nbsp;</td>
                                    <td width="175" height="20" class="ParrafoAzul">MODELO
                                      M&Aacute;QUINA</td>
                                    <td height="20"><input name="modelo" type="text" id="modelo" size="50"></td>
                                  </tr>
                                  <tr valign="middle">
                                    <td width="30" height="20">&nbsp;</td>
                                    <td width="175" height="20" class="ParrafoAzul">DESCRIBA
                                      SU INCIDENCIA </td>
                                    <td height="20">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td width="30">&nbsp;</td>
                                    <td colspan="2"><textarea name="descripcion" cols="57" rows="5" id="descripcion"></textarea></td>
                                  </tr>
                                  <tr>
                                    <td width="30">&nbsp;</td>
                                    <td colspan="2"><div align="right">
                                      <div align="right"><br>
                                        <input type="submit" name="nombre" value="Enviar">
                                        <br>
                                      </div></td>
                                  </tr>
                                </table>
                              </form> 
- El php ...
Código PHP:
<?php
   $nombre
=$_GET['nombre'];
   
$direccion=$_GET['direccion'];
   
$correo=$_GET['correo'];
   
$modelo=$_GET['modelo'];
   
$descripcion=$_GET['descripcion'];
   
$tipo="plano";
   
   
$correoneoclima="[email protected]";
   
   if (
$correo!=""){
   if (
$tipo=="plano"){
      
$mensaje "<html><head><title>Env&iacute;o desde la web de NEOCLIMA - Servicio T&eacute;cnico</title></head><body>Interesado: "$nombre "<br>Direcci&oacute;n: " $direccion "<br>email: " $correo "<br>Modelo: <br>" $modelo "<br>Asunto: <br>" $descripcion "</body></html>\n";
      
      
mail($correoneoclima,"Correo enviado desde la web."$mensaje,"Content-type: text/html\n","FROM:".$correo."\n");
   } else {
      
// Envio en formato HTML
      
mail($direccion,"Ejemplo de envio de email","<html><head><title>WebEstilo. Manual de PHP</title></head><body>Ejemplo de envio de email de HTML<br><br>WebEstilo.<br>http://www.webestilo.com/<br> <u>Manuales</u> para <b>desarrolladores</b> web.</body></html>","Content-type: text/html\n""FROM: Pruebas <[email protected]>\n");
   }      
echo 
"<div align='center' class='Parrafo'>Se ha enviado correctamente su mensaje a la direccion de PUERTO Y BAHIA.<br>En caso de ser necesario, nos pondremos en contacto con usted.<br>Gracias por su inter&eacute;s.</div>";
}
?>
... Espero ayuda por favor ... Gracias