From 41aa4f0392443b870fb7e41d4de373c8a55d3006 Mon Sep 17 00:00:00 2001 From: Jay Varner Date: Thu, 5 Sep 2024 10:31:47 -0400 Subject: [PATCH] Add 400 responses --- public/mail.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/mail.php b/public/mail.php index cf346f5..b1a255e 100644 --- a/public/mail.php +++ b/public/mail.php @@ -32,10 +32,12 @@ if (mail($recipient, $subject, $message)) { echo "Email sent successfully!"; } else { + header("HTTP/1.1 400 Bad Request"); echo "Failed to send email. Please try again later."; } } else { // Display errors + header("HTTP/1.1 400 Bad Request"); echo "The form contains the following errors:
"; foreach ($errors as $error) { echo "- $error
";