<?php

/*
 * PuzzleApp
 * Webemyos
 * Jérôme Oliva
 * GNU Licence
 */

namespace Apps\Calendar\Helper;


/**
 * Helper for Send Email
 * Send Base Email or by Email App
 * @author jerome
 */
class EmailHelper 
{
    public static function SendEmail($core, $code, $email, $params, $subject, $message) {

        $app = \Apps\EeApp\Helper\AppHelper::HaveApp($core, "Notify");

        if($app != false){

            $appPath = "\Apps\\" .$app->Name->Value . "\\". $app->Name->Value;  
            $notify = new $appPath($core);
            return $notify->SendEmail($code, $email, $params, $subject, $message);
        } else {
            //TODO ON FAIT UN EMAIL Standard
            
        }
    }
}