KZ has asked for the wisdom of the Perl Monks concerning the following question:
i m implementing a mail client, when i show the list of messages i wanna identify unread messages, i m using the Mail::Box module so i do this by checking the 'seen' field of each message, now the problem is that once i display the list of messages then even if i havnt viewed the message its 'seen' field is set to 1,so i cant detect if its unread,
is there some other field for identifying unread messages
Re: Getting Unread mail messages
by ysth (Canon) on Feb 09, 2004 at 09:45 UTC
|
I don't use Mail::Box myself, and a look at the source is enough to make one dizzy. I did see a reference to an "old" field that may be what you want. Can you look at the labels available for each message with the labels method and see what might be appropriate? | [reply] |
Re: Getting Unread mail messages
by markov (Scribe) on Feb 10, 2004 at 07:53 UTC
|
Mailbox is not setting the 'seen' flag automatically. However, when you are using POP3 or IMAP, the remote server may set it. In this case it may (or may not: depends on the server) help, to explicitly reset the seen flag after you have looked at the message:
$msg->label(seen => 0);
The same call for all folder types, but not all types have this implemented.
This is probably a question for the MailBox mailinglist,
see http://perl.overmeer.net/mailbox/ | [reply] [d/l] |
|