tharush wrote:
nabeel5 wrote:
hi AllThe request throws bad query only if the UID is not numerical, or you're trying to request mails from an unselectable folder.
i also use this code to get mail message. But some times it will display the correct result, But another time Imapx Exception occurs,"Bad Search Query"
nabeel5 wrote:
Hi ,Yeah, guess that's the only way at the moment, but it will change from next release.
Actually I was using client.Folders["INBOX"].Search("UNSEEN",true); to retrieve all message parts for all unread emails, but when there are large number of emails it takes lot of time which cause issues for the end users. So I used the UID in search string but it doesn't guarantee the MessageUID every time, so I have to change the code mentioned below and this resolve my issue.
What I am doing now is to retrieve all the Emails but not the complete detail for each item. and then upon specific user's email , I am processing the message to retrieve all the detail for that particular email and did my work.