PHP - Adjuntar archivo a mensaje

 
Vista:

Adjuntar archivo a mensaje

Publicado por EfrainMejiasC (45 intervenciones) el 31/10/2012 23:05:07
Hola ...en una pagina mando correos a una direccion electronica ....que debo hacer para poder adjuntar archivos

ESTE ES EL CODIGO CON QUE ENVIO LOS CORREOS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
error_reporting(0);
 
$fecha= "\n FECHA DE ENVIO : ".date("d-m-Y");
$hora="\n HORA DE ENVIO : ".date("H:i:s");
$miCorreo="emcingenieriadesoftware@outlook.com";
$envio=false;
$datos=false;
 
if($_POST["enviarC"])
{
 
    if($_POST["tuNombre"] && $_POST["tuCorreo"] && $_POST["asunto"] && $_POST["mensaje"])
    {
	   $par1=$_POST["tuCorreo"];$par2=$_POST["asunto"];
 
	   $nombre="\n NOMBRE : ". $_POST["tuNombre"];
	   $correo="\n DE : ". $_POST["tuCorreo"];
	   $asunto="\n ASUNTO : ". $_POST["asunto"];
	   $mail="\n CONSULTA : ".$_POST["mensaje"];
	   $mensaje= $fecha.$hora.$nombre.$correo.$asunto.$mail;
 
	   mail($miCorreo,$par2,$mensaje,$par1);
 
	   $envio=true;
    }
    else
    {
       $datos=true;
    }
 
}
?>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder