예제 #1
0
 function GetMessage($i)
 {
     $this->plainmsg = "";
     $this->htmlmsg = "";
     $structure = imap_fetchstructure($this->conn, $i);
     if (empty($structure->parts)) {
         $this->getPart($this->conn, $i, $structure, 0);
     } else {
         foreach ($structure->parts as $partno => $part) {
             $this->getPart($this->conn, $i, $part, $partno + 1);
         }
     }
     if (empty($this->plainmsg)) {
         $this->plainmsg = "EMPTY";
     }
     if (empty($this->htmlmsg)) {
         $this->htmlmsg = "EMPTY";
     }
     if (strlen($this->plainmsg) < 10 && strlen($this->htmlmsg) > 20) {
         require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'third' . DS . 'html2text.php';
         $h2t = new html2text($this->htmlmsg);
         $this->plainmsg = $h2t->getText();
     }
     if (isset($this->params['import_html']) && $this->params['import_html'] && FSS_Settings::get('allow_raw_html_messages') && strlen($this->htmlmsg) > 10) {
         $this->plainmsg = "{RAWHTML}" . FSS_Helper::filterText($this->htmlmsg);
     }
 }