
14/10/2003, 12:23
|
| | Fecha de Ingreso: febrero-2003
Mensajes: 101
Antigüedad: 22 años, 1 mes Puntos: 0 | |
no me funciona este codigo para enviar emails desde un formulario Hola, estoy intentando hacer que me funcione el envio de formulario desde mi pagina web a traves de este codigo y no me va, que me falta? que me sobra?
Saludos <?php
$phpmailmsg="Datos del Usuario:\n\n"; // beginning of email message
reset ($HTTP_POST_VARS); // reset the array pointer to the beginning, just in case
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
$phpmailmsg=$phpmailmsg."$key: $val\n"; // add each key and value (html input name and value) to message
}
reset ($HTTP_GET_VARS); // same as above, except with the GET vars (to support both methods)
while (list ($key, $val) = each ($HTTP_GET_VARS)) {
$phpmailmsg=$phpmailmsg."$key: $val\n";
}
mail ("$to", "$subject", "$phpmailmsg", "From: [email protected]" ); // send the email to the variable specified in 'to', with the 'subject' and message ('phpmailmessage')
//mail ("$to", "$subject", "$phpmailmsg", "$email\n" );
if ($redirect) header("Location: $redirect"); // if there is a redirect page specified, redirect to it
//echo "Thank you for submitting your info!"; // if not, write this to the page (modify the text between the "s to suit your needs)
?> |