andyedinborough / aenetmail

C# POP/IMAP Mail Client
370 stars 153 forks source link

BAD Could not parse command in response to multiple e-mail set flag seen on GMail #112

Open ghost opened 11 years ago

ghost commented 11 years ago

command = "xm008 UID STORE 126 FLAGS.SILENT (\Seen)"

works fine and sets message flag seen, but

command ="xm008 UID STORE 126 127 128 FLAGS.SILENT (\Seen)"
returns BAD Could not parse command from GMail, and obviously doesn't set the e-mail to seen.

called like this: imap.SetFlags(Flags.Seen, seenMessages.ToArray());

ghost commented 11 years ago

New result:

command = "xm007 UID STORE 127 128 FLAGS.SILENT (\Seen)" string returns "BAD Invalid Arguments: Unparsed STORE keyword: 128"

jstedfast commented 10 years ago

The proper way to format this command:

command ="xm008 UID STORE 126 127 128 FLAGS.SILENT (\Seen)"

is like this:

command ="xm008 UID STORE 126-128 FLAGS.SILENT (\Seen)"

serii833 commented 9 years ago

At least for gmail uids should be comma delimited not space delimited.. Like this "xm008 UID STORE 1875,1876,1877 +FLAGS.SILENT (\Seen)" Don't know if it is only a gmail specific, so will leave it in my fork for now.