Subject: How to set a unseen flag

From: "Zhang, Cenyu" <[email-masked]>
Date: Mon, 15 Apr 2002 12:17:09 -0500

Hi,

I am having some problems in resetting the message
flag to UNSEEN. in setflag(), it can only set SEEN,
DELETE etc. but not UNSEEN and RECENT. so
can anyone tell me if there is anyway around it? and
what is the reason why I can't do it in setflag? Thanks!

Cenyu

---

From: Vadim Zeitlin <[email-masked]>
Date: Mon, 15 Apr 2002 19:33:48 +0200 (CET)

On Mon, 15 Apr 2002 12:17:09 -0500 "Zhang, Cenyu" <[email-masked]> wrote:

ZC> I am having some problems in resetting the message
ZC> flag to UNSEEN. in setflag(), it can only set SEEN,
ZC> DELETE etc. but not UNSEEN and RECENT.

 If you don't specify ST_SET in the flags, the corresponding flag is going
to be cleared, so simply do something like this:

        mail_flag(stream, sequence, "\\SEEN", 0);

 At least, this works for me.

 Regards,
VZ

---

From: Mark Crispin <[email-masked]>
Date: Mon, 15 Apr 2002 10:33:55 -0700 (PDT)

On Mon, 15 Apr 2002 12:17:09 -0500, Zhang, Cenyu wrote:
> what is the reason why I can't do it in setflag?

RECENT can not be set or unset.

Setting UNSEEN is done by clearing the \Seen flag.