Example #1
0
        $start = $total - $atmail->MsgNum;
    }
}
if ($total < $atmail->MsgNum) {
    $end = $total;
} else {
    $end = $start + $atmail->MsgNum - 1;
}
if ($start < 0) {
    $start = 0;
}
if ($end < $total) {
    $end++;
}
$start++;
$emails = $mail->getmailboxsummary($start, $end, $var['folder']);
########################
// List messages from the newest to oldest
$emails = array_reverse($emails);
$id = $end;
$i = 1;
// keep track of cache ids so we don't
// have duplicates
$cacheIDs = array();
//Build message list
foreach ($emails as $email) {
    // Disable the message popup for external accounts
    if ($atmail->LoginType == 'simple' || $atmail->LoginType == 'xul' || $atmail->Ajax) {
        $atmail->Advanced = '';
    }
    $i++;