Tema: mail y php
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/08/2008, 11:46
Avatar de emiliodeg
emiliodeg
 
Fecha de Ingreso: septiembre-2005
Ubicación: Córdoba
Mensajes: 1.830
Antigüedad: 18 años, 8 meses
Puntos: 55
Respuesta: mail y php

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
__________________
Degiovanni Emilio
developtus.com