method getMsg documentation in bbn\Appui\Mailbox

function($msgno) { // input $mbox = IMAP stream, $msgno = message id // output all the following: $this->_htmlmsg = ''; $this->_plainmsg = ''; $this->_charset = ''; $this->_attachments = []; if (is_dir(BBN_USER_PATH . 'tmp_mail')) { bbn\File\Dir::delete(BBN_USER_PATH . 'tmp_mail'); } // HEADER $res = (array)$this->getMsgHeaderinfo($msgno); // add code here to get date, from, to, cc, subject... // BODY STRUCTURE $structure = $this->getMsgStructure($msgno); if (!$structure->parts) { // simple $this->_get_msg_part($msgno, $structure, 0); } else { // multipart: cycle through each part foreach ($structure->parts as $partno0 => $p){ $this->_get_msg_part($msgno, $p, $partno0 + 1); } } if ($res['html'] = $this->_htmlmsg) { $config = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($config); $res['html'] = $purifier->purify(quoted_printable_decode($res['html'])); } $res['plain'] = $this->_plainmsg; $res['charset'] = $this->_charset; $res['attachment'] = $this->_attachments; return $res; }

BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.