Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/06/2008, 04:50
maxone1
 
Fecha de Ingreso: junio-2008
Mensajes: 11
Antigüedad: 16 años, 8 meses
Puntos: 0
no funciona la funcion mail ¿porque?

buenas estoy utilizando este codigo para enviar unos datos pro correo pero no se por que no funciona alguien podria contarme?

Código PHP:
function guardar($con,$chk1,$chk2,$chk3,$chk4,$chk5,$chk6,$chk7,$chk8,$chk9)
{

    
$el_id=utf8_decode ($_POST['el_id']);
    
$id=$el_id;
    
    
$nombre=utf8_decode ($_POST['t_nombre']);
    
$apellidos=utf8_decode ($_POST['t_apellidos']);
    
$direccion=utf8_decode ($_POST['t_direccion']);
    
$poblacion=utf8_decode ($_POST['t_poblacion']);
    
$cp=utf8_decode ($_POST['t_cp']);
    
$pais=utf8_decode ($_POST['t_pais']);
    
$nif=utf8_decode ($_POST['t_nif']);
    
$nacimiento=utf8_decode ($_POST['t_nacimiento']);
    
$correo=utf8_decode ($_POST['t_correo']);
    
$permiso=utf8_decode ($_POST['t_permiso']);    
    
$telefono=utf8_decode ($_POST['t_telefono']);
    
    
$tdias=utf8_decode ($_POST['t_tdias']);
    
$foto=utf8_decode ($_POST['t_foto']);
    
$grupo=utf8_decode ($_POST['t_grupo']);
    
$fechar=utf8_decode ($_POST['t_fechar']);
    
$fechae=utf8_decode ($_POST['t_fechae']);
    
$horae=utf8_decode ($_POST['t_horae']);
    
$horar=utf8_decode ($_POST['t_horar']);
    
$talquiler=utf8_decode ($_POST['t_talquiler']);
    
$tweb=utf8_decode ($_POST['t_tweb']);    
    
$estado="proceso";    
    
 
echo 
"<center>";
    echo 
"<table class=\"list\" border=\"1px;\" cellspacing=\"10px;\">
                <thead>
                <tr>
                <td class=\"menupeke\">Su reserva está siendo procesada por Unacar, en un breve espacio de tiempo (máximo 24h. para alquileres de los grupos A, B, C y D y 48h. para el resto) Unacar se pondrá en contacto con usted vía email para verificar la reserva con los siguientes datos.
<br />Nombre: "
.$nombre." ".$apellidos."<br />NIF / Pasaporte: ".$nif."<br />Poblacion: ".$poblacion."<br />Codigo Postal: ".$cp."<br />Pais: ".$pais."<br />Fecha de nacimiento: ".$nacimiento."<br />Fecha del permiso de conducir: ".$permiso."<br />Telefono: ".$telefono."<br />Correo: ".$correo."</td>
                </table>"
;    
    echo 
"</center>";


echo 
"<center>";
    echo 
"<table class=\"list\" border=\"1px;\" cellspacing=\"10px;\">
                <thead>
                <tr>
                <td class=\"foto\"><img src=\"images/th_"
.$foto."\"></td>
                <td class=\"menupeke\">"
.$grupo."<br />Desde el ".$fechar."<br />Hasta el ".$fechae."<br />Hora de entrega ".$horae."<br />Hora de Recogida ".$horar."<br />Total dias ".$tdias."</td>
                <td class=\"txtlista\">Total a pagar "
.$talquiler."<br />Total a pagar web ".$tweb."</td>
                </table>"
;    
    echo 
"</center>";
    
      
// Código PHP ----------------------------------------------------------------------------
    //Rellenamos las variables

    
$direccion="[email protected]"//dirección de destino del mail
    
$asunto="Consulta desde www.unacar.es";
    
    
$mensaje="<table align='center'><img src='http://www.neulab.es/uncar/correo/cabecera.jpg'><br><br>";
    
$mensaje.="<html><head><br>";
    
$mensaje.="</head><body><br>";
    
$mensaje.="<div id='texto'><br>";
    
$mensaje.="<table align='center'><tr align='center'><td><strong><br/><p>FORMULARIO DE CONTACTO ENVIADO DESDE SU PÁGINA WEB</p><p style='font-size:15px;'>WWW.UNCAR.ES</p></strong></td></tr></table><br>";

    
$mensaje.="<hr><table align='center'><tr align='center'><td><img src='http://www.djpelaez.com/imagenes/flecha.gif' width='21' height='11' align='absmiddle'> <strong>Nombre y apellidos:</strong> </td><td>" .$nombre" " .$apellidos"</td></tr></table><br>";

        
$mensaje.="<hr><table align='center'><tr align='center'><td><img src='http://www.djpelaez.com/imagenes/flecha.gif' width='21' height='11' align='absmiddle'> <strong>Dirección:</strong> </td><td>" .$direccion"</td></tr></table><br>";

    
$mensaje.="<hr><table align='center'><tr align='center'><td><img src='http://www.djpelaez.com/imagenes/flecha.gif' width='21' height='11' align='absmiddle'> <strong>Población:</strong> </td><td>" .$poblacion"</td></tr></table><br>";

    
$mensaje.="<hr><table align='center'><tr align='center'><td><img src='http://www.djpelaez.com/imagenes/flecha.gif' width='21' height='11' align='absmiddle'> <strong>pais:</strong> </td><td>" .$pais"</td></tr></table><br>";
    
    
$mensaje.="<hr><table align='center'><tr align='center'><td><img src='http://www.djpelaez.com/imagenes/flecha.gif' width='21' height='11' align='absmiddle'> <strong>Codigo Postal:</strong> </td><td>" .$cp"</td></tr></table><br>";

    
$mensaje.="<hr><table align='center'><tr align='center'><td><img src='http://www.djpelaez.com/imagenes/flecha.gif' width='21' height='11' align='absmiddle'> <strong>Nif:</strong> </td><td>" .$nif"</td></tr></table><br>";


    
$mensaje.="<hr><table align='center'><tr align='center'><td><img src='http://www.djpelaez.com/imagenes/flecha.gif' width='21' height='11' align='absmiddle'><strong>Correo Electronico:</strong> </td><td>&nbsp;<a href='mailto:$correo'>" .$correo"</a></td></tr></table><br>";

    
$mensaje.="<hr><table align='center'><tr align='center'><td><a href='http://www.ideacorporativa.com' target='_blank'><img src='http://www.djpelaez.com/imagenes/logo60.jpg' width='111' height='60'  style='float: center;'></a><br>Email enviado automaticamente desde su formulario web por favor no lo responda.<br>Servicio de webmail con antispam gestionado por Idea Corporativa para sus clientes.</td></tr></table><br>";
    
$mensaje.="</div></div><br>";


       
$headers  "MIME-Version: 1.0\r\n";
       
$headers .= "X-Mailer:PHP/".phpversion()."\r\n";
       
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";     
    
$headers .="From: www.uncar.es"



    
//Enviamos el formulario
    
mail($direccion$asunto$mensaje$headers);


    
//----------------------------------------------------------------------------------------    
    
    
        
//EndFunction 

gracias por adelantado