Quote Originally Posted by David Allen View Post
Hi JC - Sounds like a similar problem to Ronel's above. I can only think that either the $error flag isn't being set when the capatcha returns as not valid, or that $error isn't being checked properly before the mail is sent.
If you could paste the top few lines of code from the file - I'll see what I can see.
Regards
David
Hi Dave
Here are the first few lines up to and including your changes. (/includes/modules/pages/contact_us/header_php.php

Code:
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));

$error = false;
if (isset($_GET['action']) && ($_GET['action'] == 'send')) {
  $name = zen_db_prepare_input($_POST['contactname']);
  $email_address = zen_db_prepare_input($_POST['email']);
  $enquiry = zen_db_prepare_input(strip_tags($_POST['enquiry']));

  $zc_validate_email = zen_validate_email($email_address);
	// add in reCaptcha check
	$resp = recaptcha_check_answer ($privatekey,
		$_SERVER["REMOTE_ADDR"],
		$_POST["recaptcha_challenge_field"],
		$_POST["recaptcha_response_field"]);

	if (!$resp->is_valid) {
		// set the error code so that we can display it
		$messageStack->add('contact', $resp->error);
		$error = true;
	}

	if ($zc_validate_email and !empty($enquiry) and !empty($name) and $error == false) {
I did not change the original version, I replaced it with the one you supplied.

Thanks
JC