Expedition de message sans objet pourquoi
Résolu
Bonjour,
J'utilise un script php pour expédier un formulaire. Le problème est que l'email que je reçois n'a pas d'objet.. Je ne vois pas pourquoi, voici mon code :
<?php
/******************************************************************************\
* Simple Page Protect Version 1.0 *
* Copyright 2000 Frederic TYNDIUK (FTLS) All Rights Reserved. *
* E-Mail: tyndiuk@ftls.org Script License: GPL *
* Created 02/28/2000 Last Modified 02/28/2000 *
* Scripts Archive at: http://www.ftls.org/php/ *
*******************************************************************************/
/*******************************************************************************/
// Necessary Variables:
$TO = "contact@mo-site.com";
// En: E-Mail of mail recipient.
// Fr: E-Mail pour l'envoie.
$DEFAULT_EXIT_PAGE = "https://www.netanswer.fr/";
// En: exit page.
// Fr: page de sortie.
// End Necessary Variables section
/******************************************************************************/
$headers = "From : un visiteur sur le site $SERVER_NAME <$mail>\n";
$headers .= "X-Mailler: PHP 3 Form2Mail made by FTLS, http://www.ftls.org/\n";
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
$message .= "\nSent by ".gethostbyaddr($REMOTE_ADDR). " ($REMOTE_ADDR)\n";
mail($TO, $subject, $message, $headers);
// En : Send mail
// Fr : Envoi du mail
if(! $exit_page)
$exit_page = $DEFAULT_EXIT_PAGE;
Header("Location: ".$exit_page);
// Exit -> $exit_page
?>
Merci
J'utilise un script php pour expédier un formulaire. Le problème est que l'email que je reçois n'a pas d'objet.. Je ne vois pas pourquoi, voici mon code :
<?php
/******************************************************************************\
* Simple Page Protect Version 1.0 *
* Copyright 2000 Frederic TYNDIUK (FTLS) All Rights Reserved. *
* E-Mail: tyndiuk@ftls.org Script License: GPL *
* Created 02/28/2000 Last Modified 02/28/2000 *
* Scripts Archive at: http://www.ftls.org/php/ *
*******************************************************************************/
/*******************************************************************************/
// Necessary Variables:
$TO = "contact@mo-site.com";
// En: E-Mail of mail recipient.
// Fr: E-Mail pour l'envoie.
$DEFAULT_EXIT_PAGE = "https://www.netanswer.fr/";
// En: exit page.
// Fr: page de sortie.
// End Necessary Variables section
/******************************************************************************/
$headers = "From : un visiteur sur le site $SERVER_NAME <$mail>\n";
$headers .= "X-Mailler: PHP 3 Form2Mail made by FTLS, http://www.ftls.org/\n";
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
$message .= "\nSent by ".gethostbyaddr($REMOTE_ADDR). " ($REMOTE_ADDR)\n";
mail($TO, $subject, $message, $headers);
// En : Send mail
// Fr : Envoi du mail
if(! $exit_page)
$exit_page = $DEFAULT_EXIT_PAGE;
Header("Location: ".$exit_page);
// Exit -> $exit_page
?>
Merci