validate();$contactForm->send();$thankYou = $config['thankYouMessage'];if(IS_AJAX){echo json_encode(array('success'=>1));exit;}}catch(FormValidateException $e){if(IS_AJAX){echo json_encode($e->errors);exit;}else{$contactForm->populateValuesFromArray($_POST);}}catch(Exception $e){die('{"exception":"'.$e->etMessage().'"}');}}?>