in reply to Get messages via IMAP with Perl?
After you have authenticated to the IMAP server, you have to select() your inbox (normally called INBOX), one of the flags returned by select will be 'unseen', it's value will be the number of new messages in that box.
Also, if you use the 'list' or 'lsub' commands to list mailboxes, they will return an unseen response as well.
| We're not surrounded, we're in a target-rich environment! |
|---|
|
|---|