in reply to Read and manage IMAP mails for me
Which gives me these results:#!/usr/bin/perl use strict; use warnings; use Mail::IMAPClient; my $now = time; print "Now is $now\n"; (my $username, my $password) = ('re','dacted'); my $imap = Mail::IMAPClient->new(Server => 'localhost', User => $username, Password => $password, Port => '143'); die "failed to instantiate $@." unless defined $imap; my $select = $imap->select('INBOX'); my @messages = $imap->messages('INBOX'); print "All @messages\n"; sleep 15; #<---Here's where I generate fresh mail, during the sleep $select = $imap->select('INBOX'); @messages = $imap->sentsince($now); print "Some @messages\n"; print "Now then was $now\n"; $now = time; print "Now now is $now\n";
What I expect is for the new mail to show up in the Some line, but it does not.Now is 1752071233 All 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3 +456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 Some Now then was 1752071233 Now now is 1752071248
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Read and manage IMAP mails for me
by NERDVANA (Priest) on Jul 10, 2025 at 17:33 UTC |