<?php

require_once(MH_DIR_CONFIG . 'config_customer_insight/classes/observer.php');
require_once(MH_DIR_CONFIG . 'config_customer_insight/functions/general.php');
mh_define('MH_BYPASS_TEMPLATE', TRUE);

$mailbeez_notifier = new MailBeezNotifier();

// add observer
// load all moduldes w/o processing

$mailbeez_insight_all_modules = mh_insight_view(null, false);
foreach ($mailbeez_insight_all_modules as $sort_order_key => $file) {
    $class = substr($file, 0, strrpos($file, '.'));


    $view_module = $GLOBALS[$class];
    $mailbeez_notifier->addObserver($view_module);
}

$mailbeez_notifier->notify();
