From 949737cf5fc2a21b36c4a269a437d0dc2e965441 Mon Sep 17 00:00:00 2001 From: polo Date: Fri, 9 Feb 2024 15:56:55 +0100 Subject: 1er commit --- contact-post.php | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 contact-post.php (limited to 'contact-post.php') diff --git a/contact-post.php b/contact-post.php new file mode 100644 index 0000000..fc7f5f3 --- /dev/null +++ b/contact-post.php @@ -0,0 +1,94 @@ +' . $passage_ligne; // expéditeur + $header .= 'Reply-to: ' . $adresse . ' <' . $adresse . '>' . $passage_ligne; // réponse + $header .= 'Return-path : ' . $adresse . ' <' . $adresse . '>' . $passage_ligne; // retour en cas d'erreur + $header .= 'MIME-Version: 1.0' . $passage_ligne; + $header .= 'Content-type: text/plain; charset=utf-8 boundary=\"' . $boundary . '\"' . $passage_ligne; + + // message + //$message = $passage_ligne."--".$boundary.$passage_ligne; + //$message .= "Content-Transfer-Encoding: 8bit".$passage_ligne; + $message .= $passage_ligne . $contenu . $passage_ligne; + //$message .= $passage_ligne."--".$boundary.$passage_ligne; + + echo $destinataire; + echo "
"; + echo $sujet; + echo "
"; + echo $message; + echo "
"; + echo $header; + + // Envoi + mail($destinataire, $sujet, $message, $header); + + // envoi réussi, on peut nettoyer + unset ($_SESSION['adresse']); + unset ($_SESSION['contenu']); + + header('Location: contact.php?erreur=0'); + } + else + { + header('Location: contact.php?erreur=1'); + } + } + else + { + header('Location: contact.php?erreur=1'); + } + } + else + { + header('Location: contact.php?erreur=1'); + } + } + else + { + header('Location: contact.php?erreur=2'); + } +} +else +{ + header('Location: contact.php?erreur=2'); +} +?> -- cgit v1.2.3