|
Hi, I want to extract only recent 10 receipts from my yahoo account. I have different mailbox folders in my yahoo account. So, right now for each of the mailbox folders I am calling imapConnection.Search() method and collecting ImapMessageCollection and after collecting all I am sorting it and then taking top 10 receipts. This process takes some time while crawling accounts having bigger mailbox folders. Is there something which can directly give me recent 10 receipts? Please suggest asap, |
|
To retrieve recent 10 receipts please use the following code:
But I have multiple mailbox folders and it might be the case that different folders having different mail dates. In that case what should I do?
(18 Aug '11, 16:53)
SanjayN
Lukas, Please suggest on this. I also want to do this using ImapSearchParameter also because some criteria i am looking for while fetching top 10 emails.
(18 Aug '11, 17:24)
SanjayN
There is no method working with multiple folders. You can work only with the currently selected one. I suggest you to call the above code for each folder, then continue with your current code (collect results together and sort). Please note, the
(18 Aug '11, 17:36)
Lukas Matyska ♦♦
Actually, there is RFC 6237 - IMAP4 Multimailbox SEARCH Extension from May 2011, Category: Experimental. This is what it says:
Rebex Imap for .NET doesn't support this extension. I think yahoo doesn't support it either.
(18 Aug '11, 17:43)
Lukas Matyska ♦♦
Ok. But can we apply ImapSearchParameter also on imap.GetMessageList(set, ImapListFields.Envelope); ActuallY I want to fetch only those recent 10 recipts which are matching with criteria?
(18 Aug '11, 17:50)
SanjayN
|
|
Sorry, I missed you need to apply some search criteria. In this case a little bit optimal code can be used. It is optimal in case the search returns a lot of emails, but you want only recent 10.
The method can be used as follows:
Thanks. Let me check this.
(19 Aug '11, 09:41)
SanjayN
|