Here are the codes:
prueba.php
CODE
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Fábula (viamonte 681 - Cap. Fed.)</title>
</head>
<body>
<script type="text/javascript">
function aquien(a){
document.form1.destinatario.value = a;
}
</script>
<a href="java script:aquien('email@gmail.com');">Email</a>
<a href="java script:aquien('anothermail@gmail.com');">Another Email</a>
<form action="prueba2.php" method="POST" name="form1" id="form1">
<p>"Your name: " <br></p>
<input type="text" name="nombre" />
<p>"Your e-mail: " <br></p>
<input type="text" name="email" />
<p>"Type a comment: " <br></p>
<textarea cols="10" rows="15" name="texto">Write here your message</textarea>
<input type="hidden" name="destinatario" value="" />
<input type="submit" value="Send" />
</form>
</body>
</html>
<head>
<title>Fábula (viamonte 681 - Cap. Fed.)</title>
</head>
<body>
<script type="text/javascript">
function aquien(a){
document.form1.destinatario.value = a;
}
</script>
<a href="java script:aquien('email@gmail.com');">Email</a>
<a href="java script:aquien('anothermail@gmail.com');">Another Email</a>
<form action="prueba2.php" method="POST" name="form1" id="form1">
<p>"Your name: " <br></p>
<input type="text" name="nombre" />
<p>"Your e-mail: " <br></p>
<input type="text" name="email" />
<p>"Type a comment: " <br></p>
<textarea cols="10" rows="15" name="texto">Write here your message</textarea>
<input type="hidden" name="destinatario" value="" />
<input type="submit" value="Send" />
</form>
</body>
</html>
prueba2.php
CODE
<?php
$nombre = stripslashes($_POST['nombre']);
$email = stripslashes($_POST['email']);
$texto = stripslashes($_POST['texto']);
$destinatario = $_POST['destinatario'];
$asunto = "[Mail de prueba]";
$mensaje = "De : $nombre \r\n";
$mensaje .= "e-Mail : $email \r\n";
$mensaje .= "---Mensaje--- \r\n".stripslashes($_POST['texto'])."\r\n\n";
if(mail($destinatario, $asunto, $mensaje, "De: $email\r\nRespoder a: $email\r\nReturn-Path: $email\r\n"))
echo "El envío fue un exito.<br>El mismo fue a parar a la casilla de $email";
?>
$nombre = stripslashes($_POST['nombre']);
$email = stripslashes($_POST['email']);
$texto = stripslashes($_POST['texto']);
$destinatario = $_POST['destinatario'];
$asunto = "[Mail de prueba]";
$mensaje = "De : $nombre \r\n";
$mensaje .= "e-Mail : $email \r\n";
$mensaje .= "---Mensaje--- \r\n".stripslashes($_POST['texto'])."\r\n\n";
if(mail($destinatario, $asunto, $mensaje, "De: $email\r\nRespoder a: $email\r\nReturn-Path: $email\r\n"))
echo "El envío fue un exito.<br>El mismo fue a parar a la casilla de $email";
?>
The problem that I have is: why the mail never arrived in my inbox?
Thanks for your help.