102 APPEND "Inbox" (\Seen "My Flag") "31-Mar-2005 05:33:48 -0500" {..}
102 APPEND "Inbox" (\Seen "MyFlag") "31-Mar-2005 05:33:48 -0500" {..}
--
Bill
Actually, the RFC is quite explicit on the matter, but you have to know
where to look. In IMAP, as in other protocols, the Formal Syntax is where
the final say is to be found. Once you know how to read the ABNF, it's
quite easy to understand.
On page 86, we find that a flag is one of the following:
. one of a named list of flags starting with \
. a flag-extension, consisting of \ followed by an atom
. a flag-keyword, which is also an atom
An atom is defined on page 82. Briefly, it is an unquoted token that does
not contain one of the following characters:
( ) { % * " \ ]
space
control characters
characters with the high bit (8-bit characters)
Note that } and [ can be used in atoms!
What this all means is that
> 102 APPEND "Inbox" (\Seen "My Flag") "31-Mar-2005 05:33:48 -0500" {..}
is invalid. "My Flag" is a quoted string, not an atom, and hence can not
be used as a flag.
> 102 APPEND "Inbox" (\Seen "MyFlag") "31-Mar-2005 05:33:48 -0500" {..}
is also invalid, because "MyFlag" is also a quoted string.
You have to use:
102 APPEND "Inbox" (\Seen MyFlag) "31-Mar-2005 05:33:48 -0500" {..}
instead. MyFlag is an atom.
Note however, that a mailbox name can be either an atom or a string, and
thus:
102 APPEND Inbox (\Seen MyFlag) "31-Mar-2005 05:33:48 -0500" {..}
works equally well.
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
"Mark Crispin" <m...@CAC.Washington.EDU> wrote in message
news:Pine.LNX.4.63.05...@shiva2.cac.washington.edu...