+
+ if ($Count>0) {
+ // If we leave mails on server, try using UIDL
+ if ($mailfetch_lmos == 'on') {
+ Mail_Fetch_Status(_("Fetching UIDL..."));
+ $msglist = $pop3->command_uidl();
+ if (is_bool($msglist)) {
+ Mail_Fetch_Status(_("Server does not support UIDL.") . ' '.htmlspecialchars($pop3->error));
+ // User asked to leave mails on server, but we can't do that.
+ $pop3->command_quit();
+ continue;
+ // $mailfetch_lmos = 'off';
+ } else {
+ // calculate number of new mails
+ for ($j = 1; $j <= sizeof($msglist); $j++) {
+ // do strict comparison ('1111.10' should not be equal to '1111.100')
+ if ($msglist[$j] === $mailfetch_uidl) {
+ $i = $j+1;
+ break;
+ }
+ }
+ }
+ }
+ // fetch list of mails with LIST
+ // we can use else control, but we can also set $mailfetch_lmos
+ // to off if server does not support UIDL.
+ if ($mailfetch_lmos != 'on') {
+ Mail_Fetch_Status(_("Fetching list of mails..."));
+ $msglist = $pop3->command_list();