Hola a todos chicos guapos!!! espero que alguno me pueda ayudar...
Tengo este codigo:
<?
if (!$HTTP_POST_VARS){
?>
<form action="mail.php" method=post>
Nombre : <input type=text name="nombre" size=25>
<br>
Email : <input type=text name=email size=25>
<br>
Nombre (destino): <input type=text name="destino" size=25>
<br>
Email (destino): <input type=text name=destinomail size=25>
<br>
Asunto: <input type=text name=asunto size=25>
<br>
Mensaje: <textarea name=coment cols=32 rows=6></textarea>
<br>
<input type=submit value="Enviar">
</form>
<?
}else{
//Estoy recibiendo el formulario, compongo el cuerpo
$asunto .= "" . $HTTP_POST_VARS["asunto"] . "\n";
$cuerpo .= "" . $HTTP_POST_VARS["coment"] . "\n";
$to .= "" . $HTTP_POST_VARS["destino"] . " <" . $HTTP_POST_VARS["destinomail"] . ">\r\n";
$headers .= "From: " . $HTTP_POST_VARS["nombre"] . " <" . $HTTP_POST_VARS["email"] . ">\r\n";
//mando el correo...
mail("$to","$asunto",$cuerpo,$headers);
//doy confirmacion del envío
echo "Se ha enviado correctamente.";
}
?>
Mi pregunta es: ¿Como puedo ponerle un bucle, para que me envie mas de 2 correos, con los mismo datos, las direcciones etc?
Por favor ayudenme =(