コード例 #1
0
        }
    } else {
        // pop
        $account = new CSourcePOP();
        $account->load($mail->account_id);
        $pop = new CPop($account);
        $pop->open();
        $file = new CFile();
        $file->setObject($object);
        $file->author_id = CAppUI::$user->_id;
        $pop = new CPop($account);
        $pop->open();
        $file_pop = $pop->decodeMail($attachment->encoding, $pop->openPart($mail->uid, $attachment->getpartDL()));
        $pop->close();
        $file->file_name = $attachment->name;
        $file->file_type = $attachment->getType($attachment->type, $attachment->subtype);
        $file->fillFields();
        $file->putContent($file_pop);
        if ($str = $file->store()) {
            CAppUI::stepAjax($str, UI_MSG_ERROR);
        } else {
            $attachment->file_id = $file->_id;
            $attachment->store();
        }
    }
}
//text link
if ($text_html || $text_plain) {
    $content_type = "text/plain";
    if ($text_html) {
        $text = new CContentHTML();