Esempio n. 1
0
$mail_id = CValue::get("id");
//usermail
$mail = new CUserMail();
$mail->load($mail_id);
$mail->loadAttachments();
//client POP
$clientPOP = new CSourcePOP();
$clientPOP->load($mail->account_id);
$pop = new CPop($clientPOP);
if (!$pop->open()) {
    return;
}
//overview
$overview = $pop->header($mail->uid);
$msgno = $overview->msgno;
$infos = $pop->infos($msgno);
//structure
$structure = $pop->structure($mail->uid);
//content
$content = $pop->getFullBody($mail->uid);
//attachments
$attachments = array();
$_attachments = $pop->getListAttachments($mail->uid);
foreach ($_attachments as $_attach) {
    $attachments[] = $_attach->getPlainFields();
}
$pop->close();
$smarty = new CSmartyDP();
$smarty->assign("mail", $mail);
$smarty->assign("overview", $overview);
$smarty->assign("structure", $structure);