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

New Post: Unique ID for Emails

$
0
0
Hi All,

I would be grateful if anybody can help me with this piece of code. What I am trying to do is to retrieve one email Content by MessageUID but It is not working. I don't want to retrieve all the USEEN emails , so I am just trying to pass the MessageUID in second search command to get the content of just 1 email at a time. But Most of the times UID sent comes with 0 count results. Would you please suggest any improvement is required in this code or any other solution that just give me the 1 unread email
                ImapX.FolderCollection folders = client.Folders;
                ImapX.MessageCollection messages = client.Folders["INBOX"].Search("UNSEEN",false); 

                for (int i = 0; i < messages.Count; i++)
                {
                    ImapX.MessageCollection messageDetails = client.Folders["INBOX"].Search("MessageUid" + messages[i].MessageUid, true);
                    .................................. Rest of the code Goes here ........................
                }
Regards
Nabeel

Viewing all articles
Browse latest Browse all 1952

Trending Articles



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