bueno deberias de hacer algo asi
Código PHP:
<?php
function getValRand(){
$dato=array(1,2,3,4,5,6,7,8,9);
$datoAleatorio=array_rand($dato,4);
for($i=0; $i<=count($datoAleatorio); $i++){
$numAleatorio=$dato[$datoAleatorio[$i]];
}
return $numAleatorio;
}
$para = "[email protected]";
$asunto = $_REQUEST['asunto'].getValRand();
$mensaje = $_REQUEST['mensaje'];
$email = $_REQUEST['email'];
$headers = "From: $email";
mail($para, $asunto, $mensaje, $headers);
?>
te recomiendo cambiar esos $_REQUEST por $_POST y el formulario lo mandes por method="post" ;)
saludos