1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Ma page de traitement</title>
</head>
<body>
<?php $adresse = "nom@gmail.com";
$site = "www.nom.net/test";
$message_envoye = "Votre message a bien été envoyé";
$TO = $adresse;
$head = "From: ".$adresse."\n";
$head .= "X-Sender: <".$adresse.">\n";
$head .= "X-Mailer: PHP\n";
$head .= "Return-Path: <".$adresse.">\n";
$head .= "Content-Type: text/plain; charset=iso-8859-1\n";
$sujet = "Formulaire de contact";
$informations = "
Nom: ".$_POST['Nom']." \r\n
Courriel: ".$_POST['Courriel']." \r\n
Adresse: ".$_POST['Adresse']."\r\n
Tel: ".$_POST['Tel']."\r\n
Language: ".$_POST['Language']." \r\n
";
$res = mail($TO, $sujet ,$informations, $head);
if (true == $res) {
echo '<p>'.$message_envoye.'</p>'."\n";
}
/*echo '<META http-equiv="www.nom/test/formail2_ok.html">';
} else {
echo '<META http-equiv="www.nom.net/test/formail2_pasok.html">';
}*/
/*Header("Location: http://".$site."/formail2_ok.html" );
} else {
Header("Location: http://".$site."/formail2_pasok.html" );
}*/
?>
</body>
</html> |