' . "\r\n" . 'Cc:' .$ccaddress . 'Reply-To: ' . $email; } else { $headers = 'From: '.$name.' <'.$emailTo.'>' . "\r\n" . 'Reply-To: ' . $email; } mail($emailTo, $subject, $body, $headers); $emailSent = true; } if(isset($emailSent) && $emailSent == true) { wp_redirect( $thankyou ); exit; } } get_header(); //Variable $nameError = isset($_POST['nameError']); $emailError = isset($_POST['emailError']); $phoneError = isset($_POST['phoneError']); $commentError = isset($_POST['commentError']); $recaptchause = get_option("arebee_recaptchause"); $siteKey = get_option("arebee_siteKey"); $secret = get_option("arebee_secret "); $emailtoaddress = get_option("arebee_contactus_emailtoaddress"); $collectphone = get_option("arebee_contactus_collectphone"); $ccemail = get_option("arebee_contactus_ccemail"); $ccaddress = get_option("arebee_contactus_ccaddress"); $thankyou = get_option("arebee_contactus_thankyou"); global $shortname; if (have_posts()) : while (have_posts()) : the_post(); ?>
id="post-">
'; the_title(); echo ''; the_content(); if(isset($hasError) || isset($captchaError)) { echo '

'; echo ('Sorry, an error occured.'); echo '

'; } ?>

( * )

  Why?

Add your keys

If you do not have keys already then visit https://www.google.com/recaptcha/admin to generate them. Edit this file and set the respective keys in $siteKey and $secret. Reload the page after this.

verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']); if (!$resp->isSuccess()) { $captchaError = true; } } } ?>