/**
  * the main function that is called when the page loads,
  * it decides the which action has to be taken for the page.
  *
  * @return null
  */
 function run()
 {
     $secretCode = CRM_Utils_Type::escape($_GET['mandrillSecret'], 'String');
     $mandrillSecret = CRM_Core_OptionGroup::values('mandrill_secret', TRUE);
     if ($secretCode !== $mandrillSecret['Secret Code']) {
         return FALSE;
     }
     if (CRM_Utils_Array::value('mandrill_events', $_POST)) {
         $reponse = json_decode($_POST['mandrill_events'], TRUE);
         if (is_array($reponse) && !empty($reponse)) {
             CRM_Mte_BAO_Mandrill::processMandrillCalls($reponse);
         }
     }
     CRM_Utils_System::civiExit();
 }