Que debo agregarle a mi codigo php?, hace tiempo no utilizo php y no recuerdo espero se tomen un 1 minuto para ayudarme
form.php
Código PHP:
<html>
<body>
<form action="enviar.php" method="POST">
Destinatario<br>
<input type="text" name="target" size="30" maxlength="30" value=""><p>
Email remitente:<BR>
<input type="text" name="email" size="20" maxlength="30"><BR>
Título:<BR>
<input type="text" name="titulo" size="20" maxlength="30"><BR>
Texto del email:<BR>
<textarea name="mensaje"></textarea>
<BR>
<INPUT type="submit" VALUE="Enviar">
</FORM>
</body>
</html>
Código PHP:
<?
//$nombre= $_POST['nombre'];
$email = $_POST['email'];
$titulo= $_POST['titulo'];
//$mensaje = $_POST['mensaje'];
$headers = "MIME-Version: 1.0 \r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1 \r\n";
$headers .= "From: $email \r\n";
//$headers .= "Return-path: $nombre <$email> \r\n";
$headers .= "X-Priority: 1 \r\n";
//$headers .= "X-MSMail-Priority: High \r\n";
//$headers .= "X-Mailer: PHP/".phpversion()." \n";
$mensaje = 'CONTENIDO DE MI MENSAJE';
if (isset($email)):
# la dirección electrónica a la que enviar el email
$target= $_POST['target'];
mail($target,$titulo,$mensaje,$headers);
endif;
?>