Пример #1
0
 /**
  * Determines if mbayer html2text is installed (more information at http://www.mbayer.de/html2text/)
  * and uses it to automatically create a text version of the html email
  *
  * @static
  * @return void
  */
 public static function determineHtml2TextIsInstalled()
 {
     self::$html2textInstalled = false;
     $paths = array("/usr/bin/html2text", "/usr/local/bin/html2text", "/bin/html2text");
     foreach ($paths as $path) {
         if (@is_executable($path)) {
             self::$html2textInstalled = true;
             return true;
         }
     }
 }
Пример #2
0
 /**
  * @static
  * returns  html2text binary installation status
  * @return boolean || null
  */
 public static function getHtml2textInstalled()
 {
     if (is_null(self::$html2textInstalled)) {
         self::$html2textInstalled = self::determineHtml2TextIsInstalled();
     }
     return self::$html2textInstalled;
 }