Ver Mensaje Individual
  #11 (permalink)  
Antiguo 11/03/2011, 13:45
Avatar de carlosmderio3
carlosmderio3
 
Fecha de Ingreso: marzo-2011
Ubicación: valencia
Mensajes: 67
Antigüedad: 14 años
Puntos: 0
Respuesta: ayuda con formulario de contacto [urgente]

Código PHP:
Ver original
  1. ; Whether or not to define the various syslog variables (e.g. $LOG_PID,
  2. ; $LOG_CRON, etc.).  Turning it off is a good idea performance-wise.  In
  3. ; runtime, you can define these variables by calling define_syslog_variables().
  4.  
  5. [mail function]
  6. ; For Win32 only.
  7. SMTP = localhost
  8. smtp_port = 25
  9.  
  10. ; For Win32 only.
  11. ;sendmail_from = me@example.com
  12. sendmail_from = webmaster_web@hotmail.es
  13. ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
  14. ;sendmail_path =

Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\AppServ\www\desde_cero\contactar.php on line 27

Código PHP:
<?php
$aviso 
"";
if ((
$_POST['email'] != "") || isset($terminos)) {
    
$email "[email protected]";
    
$subject "Contacto";
    
$mensaje "---------------------------------- \n";
    
$mensaje.= "            Contacto               \n";
    
$mensaje.= "---------------------------------- \n";
    
$mensaje.= "NOMBRE:   ".$_POST['nombre']."\n";
    
$mensaje.= "APELLIDOS:   ".$_POST['apellidos']."\n";
    
$mensaje.= "EMPRESA:  ".$_POST['empresa']."\n";
    
$mensaje.= "NIF/NIE:    ".$_POST['nie']."\n";
    
$mensaje.= "EMAIL:    ".$_POST['email']."\n";
    
$mensaje.= "TELEFONO: ".$_POST['telefono']."\n";
    
$mensaje.= "FECHA:    ".date("d/m/Y")."\n";
    
$mensaje.= "HORA:     ".date("h:i:s a")."\n";
    
$mensaje.= "IP:       ".$_SERVER['REMOTE_ADDR']."\n\n";
    
$mensaje.= "---------------------------------- \n\n";
    
$mensaje.= $_POST['mensaje']."\n\n";
    
$mensaje.= "---------------------------------- \n";
    
$mensaje.= "Enviado desde http://www.////contacto.php \n";
    
$headers "From: ".$_POST['email']."\r\n";
/* probando con esto */
}
else { 
$aviso "Rellena todos los campos y acepta los Términos"; }
/* original */
if (mail($email$subject$mensaje$headers)) { $aviso "Su mensaje fue enviado correctamente"; } 

?>
aver lo tengo asi... pero me tira este error....

[URL="http://riotercero.sytes.net/desde_cero/contactar.php"]http://riotercero.sytes.net/desde_cero/contactar.php[/URL]