Ver Mensaje Individual
  #10 (permalink)  
Antiguo 12/09/2014, 12:54
Avatar de jhon_fragozo
jhon_fragozo
 
Fecha de Ingreso: septiembre-2011
Ubicación: Bucaramanga
Mensajes: 15
Antigüedad: 12 años, 8 meses
Puntos: 0
Respuesta: No envía correo el Formulario de contacto

Bueno la verdad me han ayudado mucho; he seguido sus recomendaciones y he creado este archivo en php (send_email). lo he subido a la carpeta raiz del servidor donde tengo alojada la pagina. Pero al enviar el mensaje desde el contacto de la pagina me sale este error:

Warning: mail() expects at most 5 parameters, 9 given in /home/novamarcascom/public_html/send_email.php on line 36

send_email.php

------------------------------------

CODIGO PHP

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=utf-8" />
<title>Novamarcas</title>

<h2>Contacto</h2>
<?php
// display form if user has not clicked submit
if (!isset($_POST["submit"])) {
  
?>
  <form method="post" action="<?php echo $_SERVER["PHP_SELF"];?>">
  Nombre: <input type="text" name="author"><br>
  Dirección: <input type="text" name="address"><br>
  Teléfono: <input type="text" name="phone"><br>
  Ciudad: <input type="text" name="city"><br>
  Empresa: <input type="text" name="company"><br>
  Correo: <input type="text" name="email"><br>
  Mensaje: <textarea rows="10" cols="40" name="text"></textarea><br>
  <input type="submit" name="submit" value="Submit Feedback">
  </form>
  <?php 
} else {    // the user has submitted the form
  // Check if the "author" input field is filled out
  
if (isset($_POST["author"])) {
    
$author $_POST["author"]; // sender
    
$address $_POST["address"];
    
$phone $_POST["phone"];
    
$city $_POST["subject"];
    
$company $_POST["company"];
    
$email $_POST["email"];
    
$text $_POST["text"];
    
// message lines should not exceed 70 characters (PHP rule), so wrap it
    
$message wordwrap($message70);
    
// send mail
    
mail("[email protected]",$author,$address,$phone,$city,$company,$email,$text,"Nombre: $author\n");
    echo 
"Gracias por enviarnos su mensaje, en breve nos estaremos comunicando con usted";
  }
}
?>
</head>

<body>
</body>
---------------------------

CODIGO HTML - Pagina de contacto

Código HTML:
<!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=utf-8" />
<title>NOVAMARCAS</title>
<meta name="keywords" content="Chrome, Contact, Web Design, CSS, HTML, free template" />
<meta name="description" content="Contact Chrome Web - free HTML CSS template from templatemo.com" />
<link href="templatemo_style.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />

<link rel="shortcut icon" href="images/favicon.ico">

<script type="text/javascript" src="scripts/jquery.min.js"></script>
<script type="text/javascript" src="scripts/ddsmoothmenu.js">

/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

<script type="text/javascript">

ddsmoothmenu.init({
	mainmenuid: "templatemo_menu", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

</script>

</head>
<body>

<div id="templatemo_wrapper">

	<div id="templatemo_header">
    
    	<div id="site_title"><h1><a href="http://www.novamarcas.com.co" target="_parent">Novamarcas</a></h1></div>
        
        <div id="templatemo_menu" class="ddsmoothmenu">
            <ul>
              	<li><a href="index.html" class="selected">Inicio</a></li>
          		<li><a href=>Productos</a>
                    <ul>
                        <li><a href="gracia.html">Gracia</a></li>
                        <li><a href="santa.html">Santa Gracia</a></li>
                </ul>
              	</li>
          		<li><a href="somos.html">¿Quienes Somos?</a>
                           </li>
              	<li><a href="contacto.html">Contacto</a></li>
            </ul>
            <br style="clear: left" />
        </div> <!-- end of templatemo_menu -->
        
    </div> <!-- end of header -->
    
    <div id="templatemo_main">
    	<h2>Contáctenos</h2>
        <div class="col_w630 float_l">
        	
             <div id="contact_form">
        
                <h5>Aqui puedes dejarnos tus inquietudes o contactar con nuestros asesores.</h5>
                
                <form method="post" name="contact" action="send_email.php">
                    <input type="hidden" name="post" value="Send" />
                    <label for="author">Nombre:</label> <input type="text" id="author" name="author" class="input_field" />
                    <div class="cleaner h10"></div>
                    
                    <label for="address">Dirección:</label> <input type="text" id="address" name="address " class="input_field" />
                    <div class="cleaner h10"></div>
                    
                    <label for="phone">Teléfono:</label> <input type="text" id="phone" name="phone" class="input_field" />
                    <div class="cleaner h10"></div>
                    
                    <label for="city">Ciudad:</label> <input type="text" id="city" name="city" class="input_field" />
                    <div class="cleaner h10"></div>
                    
                    <label for="company">Empresa:</label> <input type="text" id="company" name="company" class="input_field" />
                    <div class="cleaner h10"></div>
                    
                    <label for="email">Correo:</label> <input type="text" id="email" name="email" class="validate-email input_field" />
                    <div class="cleaner h10"></div>
                    
                    <label for="text">Mensaje:</label> <textarea id="text" name="text" rows="0" cols="0"></textarea>
                    <div class="cleaner h10"></div>
                    
                    <input type="submit" class="submit_btn float_l" name="submit" id="submit" value="Enviar" />
                    <input type="reset" class="submit_btn float_r" name="reset" id="reset" value="Restablecer" />
                
                </form>
        
            </div> 
        </div>
        
        <div class="col_w300 float_r">
            <div class="col_fw">	
            <h4>Dirección:  <a href="http://es.forwallpaper.com" title="fondos de pantalla" class="project_big" rel="nofollow" target="_blank"></a></h4>
                <h6>Punto de Fábrica - Cr 11 #30-05 - El Centro</h6>
                Bucaramanga - Santander - Colombia<br />
            <br />
          Teléfono: (7) 6704600 <a href="http://validator.w3.org/check?uri=referer" rel="nofollow"></a> ; <a href="http://jigsaw.w3.org/css-validator/check/referer" rel="nofollow"></a></div>            
            <div class="col_fw_last">
                <h4>Nuestra Ubicación</h4>
                <div id="map"><a class="pirobox" href="https://www.google.es/maps/place/Carrera+11+%23+30-5,+Bucaramanga,+Santander,+Colombia/@7.1207726,-73.1321316,18z/data=!4m2!3m1!1s0x8e683fd5bdf84cb7:0xa4993f92442d55c2" target="_blank" title="Punto de Fábrica."><img src="images/map_thumb.jpg" alt="Image" /></a></div>                
            </div>
        </div>
	    <div class="cleaner"></div>
    </div> <!-- end of main -->
</div>

<div id="templatemo_footer_wrapper">
    <div id="templatemo_footer">
        Copyright © 2014 <a href="#">NovaMarcas</a> | 
        Designed by <a href="http://www.templatemo.com" target="_parent">Free CSS Templates - Fragox Design & Alt Studio</a>
        <div class="cleaner"></div>
    </div>
</div> 
  

<script type='text/javascript' src='js/logging.js'></script>
</body>
</html>