Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Getting Unread mail messages

by KZ (Initiate)
on Feb 09, 2004 at 08:49 UTC ( [id://327571]=perlquestion: print w/replies, xml ) Need Help??

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

Replies are listed 'Best First'.
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?
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/

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://327571]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2024-03-29 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found