Les dejo el codigo de como quedo y funciona para quienes lo esten necesitando:
HTML:
Código HTML:
Ver original<form name='formulario' id='formulario' method='post' action='enviar.php' target='_self' enctype="multipart/form-data"> <input id="Nombre" type="text" name="Nombre" placeholder="Nombre y Apellido" required /><br/> <input type='text' name='telefono' id='telefono' value="Con Codigo de Area" onclick="if(this.value=='Con Codigo de Area') this.value=''" onblur="if(this.value=='') this.value='Con Codigo de Area'">
<input name="archivo1" type="file" id="archivo1"><br/> <input id="submit" type="submit" name="submit" value="Enviar" /> <h5>En el caso de enviar fotos, recuerde detallar en el campo mensajes para que sección es y dejar datos de contacto. El tamaño de la imagen debe ser menor a 2Mb.
</h5>
PHP:
Código PHP:
Ver original<?php
function form_mail($sPara, $sAsunto, $sTexto, $sDe)
{
$bHayFicheros = 0;
$sCabeceraTexto = "";
$sAdjuntos = "";
if ($sDe)$sCabeceras = "From:".$sDe."\n";
else $sCabeceras = "";
$sCabeceras .= "MIME-version: 1.0\n";
foreach ($_POST as $sNombre => $sValor)
$sTexto = $sTexto."\n".$sNombre." = ".$sValor;
foreach ($_FILES as $vAdjunto)
{
if ($bHayFicheros == 0)
{
$bHayFicheros = 1;
$sCabeceras .= "Content-type: multipart/mixed;";
$sCabeceras .= "boundary=\"--_Separador-de-mensajes_--\"\n";
$sCabeceraTexto = "----_Separador-de-mensajes_--\n";
$sCabeceraTexto .= "Content-type: text/plain;charset=iso-8859-1\n";
$sCabeceraTexto .= "Content-transfer-encoding: 7BIT\n";
$sTexto = $sCabeceraTexto.$sTexto;
}
if ($vAdjunto["size"] > 0)
{
$sAdjuntos .= "\n\n----_Separador-de-mensajes_--\n";
$sAdjuntos .= "Content-type: ".$vAdjunto["type"].";name=\"".$vAdjunto["name"]."\"\n";;
$sAdjuntos .= "Content-Transfer-Encoding: BASE64\n";
$sAdjuntos .= "Content-disposition: attachment;filename=\"".$vAdjunto["name"]."\"\n\n";
$oFichero = fopen($vAdjunto["tmp_name"], 'r'); }
}
if ($bHayFicheros)
$sTexto .= $sAdjuntos."\n\n----_Separador-de-mensajes_----\n";
return(mail($sPara, $sAsunto, $sTexto, $sCabeceras)); }
//cambiar aqui el email
"Los datos introducidos en el formulario son:\n\n", $_POST[email]))
echo "
<script language='javascript'>
alert('Mensaje enviado, muchas gracias.');
window.location.href = 'http://www.clickdisenos.com.ar/intermedia/contacto.html';
</script>";
?>