Tengo un problema con un formulario de contacto con archivos adjuntos y es que este no envia nada y no encuentro el error, pues antes me funcionaba y ahora no.. Si alguien pudiese revisarlo a ver en q lio me meti o en q falla se lo agradeceria...
aquyi les dejo el codigo
Código PHP:
   <?php
if ($_SERVER['REQUEST_METHOD']=="POST")
{
  $to="[email protected]";
  $subject="Selección de Talentos";
    
    // Pone el nombre y el correo de quien lo envia
    // solo ponemos las variables que las va a enviar el formulario
    $from = stripslashes($_POST['nombre'])."<".stripslashes($_POST['email']).">";
    
    // Guardamos el texto del mensaje
    $message = "Nombre: ".$_POST['nombre']."\n";
    $message .= "Apellido: ".$_POST['apellido']."\n";
    $message .= "Profesión: ".$_POST['profesion']."\n";
    $message .= "E-mail: ".$_POST['email']."\n";
    $message .= "Teléfonos: ".$_POST['telefono']."\n\n"; 
    $message .= "Mensaje: ".$_POST['comentario'];
 
    // generate a random string to be used as the boundary marker
    //$mime_boundary="==Multipart_Boundary_x".md5(mt_rand())."x";
    $semi_rand = md5(time());
    $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
    
    // Valida el acceso del archivo 1
    if(isset($_FILES))
    {
    if($_FILES['filename1']['tmp_name'])
    {
    $tmp_name1 = $_FILES['filename1']['tmp_name'];
    $type1 = $_FILES['filename1']['type'];
    $name1 = $_FILES['filename1']['name'];
    $size1 = $_FILES['filename1']['size'];
    }
    }
    if (file_exists($tmp_name1))
    {
    if(is_uploaded_file($tmp_name1))
    {
    $file1 = fopen($tmp_name1,'rb');
    $data1 = fread($file1,filesize($tmp_name1));
    fclose($file1);
    $data1 = chunk_split(base64_encode($data1));
    }    
    $headers = "From: $from\r\n" .
    "MIME-Version: 1.0\r\n" .
    "Content-Type: multipart/mixed;\r\n".
    " boundary=\"{$mime_boundary}\"";
    $message = "This is a multi-part message in MIME format.\n\n".
    "--{$mime_boundary}\n" .
    "Content-Type: text/plain; charset=\"iso-8859-1\"\n" .
    "Content-Transfer-Encoding: 7bit\n\n".
    $message . "\n\n";
     
//Inicia el 1
 $message .= "--{$mime_boundary}\n" .
 "Content-Type: {$type1};\n" .
 " name=\"{$name1}\"\n" .
 "Content-Transfer-Encoding: base64\n\n" .
 $data1 . "\n\n" .
 "--{$mime_boundary}--\n";
         
 if (@mail($to, $subject, $message, $headers))
 {
  echo "Sus datos se han enviado correctamente.";
 }
  else
  {
  echo "Fallo en el envío, intente nuevamente.";
  }
  }
}
else
{
?>
                    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"
   enctype="multipart/form-data" name="form1" id="form1">
                      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                          <td height="30" bordercolor="#FFFFFF"> </td>
                        </tr>
                        <tr>
                          <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="2">
                              <tr>
                                <td height="30" align="right" class="textoINDEX">Nombre: </td>
                                <td width="214" colspan="2"><span class="Estilo1">
                                  <input name="nombre" type="text" class="textoINDEX" id="nombre" size="30" />
                                </span></td>
                              </tr>
                              <tr>
                                <td height="30" align="right" class="textoINDEX"><div align="right">Apellido:</div></td>
                                <td colspan="2"><input name="apellido" type="text" class="textoINDEX" id="apellido" size="30" /></td>
                              </tr>
                              <tr>
                                <td height="30" align="right" class="textoINDEX"><div align="right">Profesión:</div></td>
                                <td colspan="2"><input name="profesion" type="text" class="textoINDEX" id="profesion" size="30" /></td>
                              </tr>
                              <tr>
                                <td height="30" align="right" class="textoINDEX"><div align="right"><span class="Estilo1">E-mail:</span></div></td>
                                <td colspan="2"><input name="email" type="text" class="textoINDEX" id="email" size="30" /></td>
                              </tr>
                              <tr>
                                <td height="30" align="right" class="textoINDEX"><div align="right"><span class="Estilo1">Teléfonos:</span></div></td>
                                <td colspan="2"><input name="telefono" type="text" class="textoINDEX" id="telefono" size="30" /></td>
                              </tr>
                              <tr>
                                <td height="30" align="right" class="textoINDEX"><div align="right"><span class="Estilo1">Comentarios:</span></div></td>
                                <td colspan="2"><textarea name="comentario" cols="30" rows="6" class="textoINDEX" id="comentario"></textarea></td>
                              </tr>
                              <tr>
                                <td height="30" colspan="3" align="right" class="textoINDEX">Adjuntar Resumen Curricular: </td>
                                </tr>
                              <tr>
                                <td height="30" align="right" class="textoINDEX"><div align="right"></div></td>
                                <td colspan="2"><input name="filename1" type="file" class="textoINDEX" id="filename1" /></td>
                              </tr>
                              <tr>
                                <td colspan="3" class="Estilo3"><table width="90%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td height="30" align="right"><input name="Submit" type="submit" class="noticias_home" value="Enviar" />
                                          <input name="Submit2" type="reset" class="noticias_home" value="Borrar" /></td>
                                    </tr>
                                </table></td>
                              </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td height="40" valign="middle"><p align="center" class="Estilo3"><span class="precioTEXTO">Recuerde solo adjuntar archivos en formato PDF, Word o en Excel.</span><br />
                          </p></td>
                        </tr>
                      </table>
                    </form>
                  <p>
                      <?php } ?>    http://nds.com.ve/amd/contacto.php
Gracias de antemano
 
 




