andyedinborough / aenetmail

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

Exception hit when setting \SEEN flag with Outlook.com and IMAP #157

Open Shogan opened 10 years ago

Shogan commented 10 years ago

Hi there,

I'm getting the following exception when trying to set the read/seen flag on any message in a mailbox on outlook.com. I am connected using the standard IMAP method for outlook.com. My code works perfectly fine on other services like gmail and yahoo mail but just not outlook.com for some reason.

Exception message: 2 FETCH (FLAGS (\Seen) UID 100003)

Here is a screenshot of the exception on a different message: https://dl.dropboxusercontent.com/u/450727/exception-info.jpg

jstedfast commented 10 years ago

You are getting an untagged response and your CheckResponseOk() method is not expecting that, it is expecting the " OK ..." response.

This is likely somewhat related to issue #154

Is that the UID you just set the flags for?

Did you override the ImapClient.Store() method to not use FLAGS.SILENT?

Normally, when you use FLAGS.SILENT, the IMAP server will refrain from sending you untagged flags-changed notifications. However, if another client changed the flags or the flags were somehow changed by something other than you, it might still send untagged flags-changed responses that the client needs to deal with.

Shogan commented 10 years ago

I believe that is the UID I just set the flags for, yes. I'm still learning IMAP so I'm not 100% sure. I haven't tried overriding ImapClient.Store() to not use FLAGS.SILENT, but will look into that, thanks!