Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/02/2010, 03:07
dirodro
 
Fecha de Ingreso: febrero-2010
Mensajes: 10
Antigüedad: 14 años, 2 meses
Puntos: 0
Problema envio formulario PHP

Hola buenas, es la primera vez que realizo un formulario con tantos campos y no consigo que me llegue al correo a pesar de que al enviarlo me dice que se ha enviado todo bien. A ver si me podeis ayudar, no se que es lo que hago mal. Os pongo el codigo:

Código PHP:
<?php
ini_set
('display_errors''On'); 
// Muestro todos los errores, incluso los estrictos 
error_reporting(E_ALL E_STRICT); 

    
$para="[email protected]";
    
$asunto="Prueba de envío de formulario de pedido";
    
$mensaje="PROPUESTA DE PEDIDO: ".$_POST['n_pedido']."\n";
    
$mensaje.="Agente: ".$_POST["agente"]."\n";
    
$mensaje.="FORMA DE PAGO: ".$_POST["radiobutton1"]."\n";
    
$mensaje.="Fecha: ".$_POST['fecha']."\n";
    
$mensaje.="Cliente nº: ".$_POST['n_cliente']."\n";
    
$mensaje.="N.I.F.: ".$_POST["nif"]."\n";
    
$mensaje.="Vto: ".$_POST['vto']."\n";
    
$mensaje.="Día de pago: ".$_POST['dia_pago']."\n";
    
$mensaje.="C.C.C: ".$_POST['banco']."|".$_POST['sucursal']."|".$_POST['dig_control']."|".$_POST['n_cuenta']."\n";
    
$mensaje.="Empresa: ".$_POST["empresa"]."\n";
    
$mensaje.="Domicilio: ".$_POST["domicilio"]."\n";
    
$mensaje.="Cod. Postal: ".$_POST['cod_postal']."\n";
    
$mensaje.="Población: ".$_POST["poblacion"]."\n";
    
$mensaje.="Provincia: ".$_POST["provincia"]."\n";
    
$mensaje.="Telf.: ".$_POST['telf']."\n";
    
$mensaje.="Fax: ".$_POST['fax']."\n";
    
$mensaje.="Hace el pedido: ".$_POST["hace_pedido"]."\n";
    
$mensaje.="Nombre establecimiento: ".$_POST["nombre_establecimiento"]."\n";
    
$mensaje.="TIPO PEDIDO: ".$_POST["radiobutton2"]."\n";
    
$mensaje.="DOMICILIO MERCANCIA: ".$_POST["domicilio_mercancia"]."\n";
    
$mensaje.="---------------------------------------------------------------------------------------------------------------------- \n";
    
$mensaje.=" |BULTOS||    REFERENCIA    ||CANTIDAD||            ARTICULO            ||P.V.P.||    DTO.    ||IMPORTE||            OBSERVACIONES            | \n";
    
$mensaje.="---------------------------------------------------------------------------------------------------------------------- \n";
    
$mensaje.=$_POST["bultos"].$_POST["referencia"].$_POST["cantidad"].$_POST["articulo"].$_POST["pvp"].$_POST["dto"].$_POST["importe"].$_POST["observaciones"]."\n";
    
$mensaje.=$_POST["bultos2"].$_POST["referencia2"].$_POST["cantidad2"].$_POST["articulo2"].$_POST["pvp2"].$_POST["dto2"].$_POST["importe2"].$_POST["observaciones2"]."\n";
    
$mensaje.=$_POST["bultos3"].$_POST["referencia3"].$_POST["cantidad3"].$_POST["articulo3"].$_POST["pvp3"].$_POST["dto3"].$_POST["importe3"].$_POST["observaciones3"]."\n";
    
$mensaje.=$_POST["bultos4"].$_POST["referencia4"].$_POST["cantidad4"].$_POST["articulo4"].$_POST["pvp4"].$_POST["dto4"].$_POST["importe4"].$_POST["observaciones4"]."\n";
    
$mensaje.=$_POST["bultos5"].$_POST["referencia5"].$_POST["cantidad5"].$_POST["articulo5"].$_POST["pvp5"].$_POST["dto5"].$_POST["importe5"].$_POST["observaciones5"]."\n";
    
$mensaje.=$_POST["bultos6"].$_POST["referencia6"].$_POST["cantidad6"].$_POST["articulo6"].$_POST["pvp6"].$_POST["dto6"].$_POST["importe6"].$_POST["observaciones6"]."\n";
    
$mensaje.=$_POST["bultos7"].$_POST["referencia7"].$_POST["cantidad7"].$_POST["articulo7"].$_POST["pvp7"].$_POST["dto7"].$_POST["importe7"].$_POST["observaciones7"]."\n";
    
$mensaje.=$_POST["bultos8"].$_POST["referencia8"].$_POST["cantidad8"].$_POST["articulo8"].$_POST["pvp8"].$_POST["dto8"].$_POST["importe8"].$_POST["observaciones8"]."\n";
    
$mensaje.=$_POST["bultos9"].$_POST["referencia9"].$_POST["cantidad9"].$_POST["articulo9"].$_POST["pvp9"].$_POST["dto9"].$_POST["importe9"].$_POST["observaciones9"]."\n";
    
$mensaje.=$_POST["bultos10"].$_POST["referencia10"].$_POST["cantidad10"].$_POST["articulo10"].$_POST["pvp10"].$_POST["dto10"].$_POST["importe10"].$_POST["observaciones10"]."\n";
    
$mensaje.=$_POST["bultos11"].$_POST["referencia11"].$_POST["cantidad11"].$_POST["articulo11"].$_POST["pvp11"].$_POST["dto11"].$_POST["importe11"].$_POST["observaciones11"]."\n";
    
$mensaje.=$_POST["bultos12"].$_POST["referencia12"].$_POST["cantidad12"].$_POST["articulo12"].$_POST["pvp12"].$_POST["dto12"].$_POST["importe12"].$_POST["observaciones12"]."\n";
    
$mensaje.=$_POST["bultos13"].$_POST["referencia13"].$_POST["cantidad13"].$_POST["articulo13"].$_POST["pvp13"].$_POST["dto13"].$_POST["importe13"].$_POST["observaciones13"]."\n";
    
$mensaje.=$_POST["bultos14"].$_POST["referencia14"].$_POST["cantidad14"].$_POST["articulo14"].$_POST["pvp14"].$_POST["dto14"].$_POST["importe14"].$_POST["observaciones14"]."\n";
    
$mensaje.=$_POST["bultos15"].$_POST["referencia15"].$_POST["cantidad15"].$_POST["articulo15"].$_POST["pvp15"].$_POST["dto15"].$_POST["importe15"].$_POST["observaciones15"]."\n";
    
$mensaje.=$_POST["bultos16"].$_POST["referencia16"].$_POST["cantidad16"].$_POST["articulo16"].$_POST["pvp16"].$_POST["dto16"].$_POST["importe16"].$_POST["observaciones16"]."\n";
    
$mensaje.=$_POST["bultos17"].$_POST["referencia17"].$_POST["cantidad17"].$_POST["articulo17"].$_POST["pvp17"].$_POST["dto17"].$_POST["importe17"].$_POST["observaciones17"]."\n";
    
$mensaje.=$_POST["bultos18"].$_POST["referencia18"].$_POST["cantidad18"].$_POST["articulo18"].$_POST["pvp18"].$_POST["dto18"].$_POST["importe18"].$_POST["observaciones18"]."\n";
    
$mensaje.=$_POST["bultos19"].$_POST["referencia19"].$_POST["cantidad19"].$_POST["articulo19"].$_POST["pvp19"].$_POST["dto19"].$_POST["importe19"].$_POST["observaciones19"]."\n";
    
$mensaje.=$_POST["bultos20"].$_POST["referencia20"].$_POST["cantidad20"].$_POST["articulo20"].$_POST["pvp20"].$_POST["dto20"].$_POST["importe20"].$_POST["observaciones20"]."\n";
    
$mensaje.=$_POST["bultos21"].$_POST["referencia21"].$_POST["cantidad21"].$_POST["articulo21"].$_POST["pvp21"].$_POST["dto21"].$_POST["importe21"].$_POST["observaciones21"]."\n";
    
$mensaje.=$_POST["bultos22"].$_POST["referencia22"].$_POST["cantidad22"].$_POST["articulo22"].$_POST["pvp22"].$_POST["dto22"].$_POST["importe22"].$_POST["observaciones22"]."\n";
    
$mensaje.=$_POST["bultos23"].$_POST["referencia23"].$_POST["cantidad23"].$_POST["articulo23"].$_POST["pvp23"].$_POST["dto23"].$_POST["importe23"].$_POST["observaciones23"]."\n";
    
$mensaje.=$_POST["bultos24"].$_POST["referencia24"].$_POST["cantidad24"].$_POST["articulo24"].$_POST["pvp24"].$_POST["dto24"].$_POST["importe24"].$_POST["observaciones24"]."\n";
    
$mensaje.=$_POST["bultos25"].$_POST["referencia25"].$_POST["cantidad25"].$_POST["articulo25"].$_POST["pvp25"].$_POST["dto25"].$_POST["importe25"].$_POST["observaciones25"]."\n";
    
$mensaje.=$_POST["bultos26"].$_POST["referencia26"].$_POST["cantidad26"].$_POST["articulo26"].$_POST["pvp26"].$_POST["dto26"].$_POST["importe26"].$_POST["observaciones26"]."\n";
    
$mensaje.=$_POST["bultos27"].$_POST["referencia27"].$_POST["cantidad27"].$_POST["articulo27"].$_POST["pvp27"].$_POST["dto27"].$_POST["importe27"].$_POST["observaciones27"]."\n";
    
$mensaje.=$_POST["bultos28"].$_POST["referencia28"].$_POST["cantidad28"].$_POST["articulo28"].$_POST["pvp28"].$_POST["dto28"].$_POST["importe28"].$_POST["observaciones28"]."\n";
    
$mensaje.=$_POST["bultos29"].$_POST["referencia29"].$_POST["cantidad29"].$_POST["articulo29"].$_POST["pvp29"].$_POST["dto29"].$_POST["importe29"].$_POST["observaciones29"]."\n";
    
$mensaje.=$_POST["bultos30"].$_POST["referencia30"].$_POST["cantidad30"].$_POST["articulo30"].$_POST["pvp30"].$_POST["dto30"].$_POST["importe30"].$_POST["observaciones30"]."\n";
    
$mensaje.="---------------------------------------------------------------------------------------------------------------------- \n";
    
$mensaje.="TOTAL BULTOS: ".$_POST["total_bultos"]."\n";
    
$mensaje.="TOTAL NETO: ".$_POST["total_neto"]."\n";
    
$mensaje.="+IVA (RD. 2028/85): ".$_POST["iva"]."\n";
    
$mensaje.="TOTAL (s.e.u.o.): ".$_POST["total"]."\n";
    
$mensaje.="---------------------------------------------------------------------------------------------------------------------- \n";
    
$mail="[email protected]";
    
    
$headers="From: " $mail " \r\n";
    
$headers.="MIME-Version: 1.0\r\n";
    
$headers.="Content-type: text/html; charset=iso-8859-1\r\n"

    if(
mail($para,$asunto,utf8_decode($mensaje),$headers)){
        echo 
'El pedido se ha enviado correctamente';
        }
        else echo 
'El pedido no ha podido enviarse'
?>