If I use FetchMessage with ListMessages collection, everything works fine.
However, I need to access the message sometimes directly.
For example, I download a local copy, but without the attachments.
I save the UniqueURI and MessageID, so I can retrieve these attachments later.
However, trying to call the FetchMessage directly gives me an error:
AE_26_1_0004 BAD Command received in Invalid state.
I believe this works fine for exchange, but I cannot get this to work with IMAP.
code is below where ID is the Unique ID from original listmessages call
Private Function GetIMAPMessage(strID As String) As MailMessage Dim msg As MailMessage = Nothing Try Dim client As ImapClient = LoginIMAPCredential() If client Is Nothing Then Return Nothing End If msg = client.FetchMessage(strID) client.Dispose() Catch ex As Exception End Try Return msg End Function