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
";