Quantcast
Channel: ImapX 2
Viewing all articles
Browse latest Browse all 1952

New Post: Error when downloading messages by Uid()

$
0
0
Hi Pavel,

I just want to get messages by UId and set them as seen.
here is my code:
            Dim f As ImapX.Folder = cli.Folders.Inbox
            f.Messages.Download(arr)
            For Each m As ImapX.Message In f.Messages
                  m.Seen = True
             Next
arr contains the UIds.
I get an error in the f.Messages.Download(arr) row.

By debugging the source code, I've found that the error is because BodyParts is null (row 548 messages.cs)
         foreach (MessageContent bodyPart in BodyParts)
is into the method:
   public bool Download(MessageFetchMode mode = MessageFetchMode.ClientDefault, bool reloadHeaders = false)
Any suggestion ?
Thanks.

Best regards,
Francesco

Viewing all articles
Browse latest Browse all 1952

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>