示例#1
0
 /**
  * Checks configuration to conclude if EmailService is usable.
  */
 public static function canUse()
 {
     if (isset(self::$_canUse) === false && (self::$_canUse === true || self::$_canUse === false)) {
         return self::$_canUse;
     }
     $canuse = EmailConfiguration::canUse();
     if (strtolower(trim($canuse)) === 'production') {
         $canuse = ApplicationConfiguration::isProductionInstance();
     }
     if ($canuse !== true && $canuse !== false) {
         $canuse = false;
     }
     self::$_canUse = $canuse;
     return self::$_canUse;
 }