diff --git a/PHP/main.php b/PHP/main.php index 00cbb29..ba17083 100644 --- a/PHP/main.php +++ b/PHP/main.php @@ -11,13 +11,15 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { $email_body = "You have received a new message from $name ($email):\n\n$message"; - $headers = "From: $name <$email>\r\n"; + $from = "hugo.crneau@gmail.com"; + + $headers = "From: $from\r\n"; $headers .= "Reply-To: $email\r\n"; if (mail($to, $email_subject, $email_body, $headers)) { - header("Location: index.html"); - exit; + echo "success"; } else { - echo "Failed to send the email."; + echo "error"; } -} \ No newline at end of file +} +?> diff --git a/index.html b/index.html index 6e1ec54..eb1cb72 100644 --- a/index.html +++ b/index.html @@ -746,34 +746,34 @@ me contacter au mail ci dessus)