Search Query

Jan 6, 2014 at 5:49 PM
Can you tell me how to fetch messages whose uid > 100(or any other number)

Waiting For Your Reply..
Coordinator
Jan 6, 2014 at 6:33 PM
Hi paliwalvimal1993,

performing a query like this is possible, however you need to give a range:
var uIdFrom = 100;
var uIdTo = 10000;
var msgs = folder.Search(string.Format("UID {0}:{1}", uIdFrom, uIdTo));
Best regards,

Pavel
Jan 7, 2014 at 10:51 AM
Edited Jan 7, 2014 at 11:58 AM
isn't there any way where we can just write that fetch all mails whose UID is greater than 100 instead of giving the range..
Jan 7, 2014 at 11:59 AM
The query you said is not working. It's giving error as "The search query could not be processed"
Coordinator
Jan 7, 2014 at 2:52 PM
Giving the range is a limitation of the IMAP protocol. Which IMAP server are you using? The query works fine for me on GMail.
Jan 7, 2014 at 4:32 PM
Even I am using Gmail..

Please do something fast pavel..Still you haven't solved the problem of downloading attachments..

Even the solution for getting RAW message is pending..

Please make it as fast as you can make it..
Coordinator
Jan 7, 2014 at 5:22 PM
Hi paliwalvimal1993,

I want to remind you that this is an open source project being developed in spare time.
I am trying to provide good support reacting fast to your messages here and also resolving issues, and unlike to other projects you don't need to wait weeks for an answer.

However, it is not possible to react to an error report without any details. For first you could provide the output the library generates when you set client.IsDebug to true, so I see how the server is responding to your query.
Jan 8, 2014 at 12:20 PM
This is the code which I am writing :

imap4X.Host = pop.gmail.com
imap4X.Port = 995
imap4X.UseSsl = true
imap4X.Connect()
imap4X.Login(username, password)
inboxMsgs = imap4X.Folders.Inbox.Search(String.Format("UID {0}:{1}", startRange, endRange))


This is the error which I am getting : The search query could not be processed

The full detail of the error is here : https://drive.google.com/file/d/0B-KkcQZM-X_rclNRcmViREtnSW8/edit?usp=sharing
Jan 8, 2014 at 12:29 PM
Have you confirmed that the calls to Connect() and Login() were successful?
What are the values of startRange and endRange?
What is the exception chain?

Please don't host your screeenshots at a site that requires viewers to have an account and login.

--Ravi
Jan 8, 2014 at 1:09 PM
Both Connect & Login methods are working successfull..

The screenshot doesn't require account or login..anyone can see it directly without login..
Jan 8, 2014 at 2:13 PM
What are the values of startRange and endRange?
What is the exception chain?

: The screenshot doesn't require account or login..anyone can see it directly without login..
I had to login to see it.

--Ravi
Coordinator
Jan 8, 2014 at 5:43 PM
paliwalvimal1993, the exception details are useless here, as it is always being thrown when the server is returning NO or bad command during a search. What I need to know is, as Ravi has said, the values for start and end of the range, as well as the debug output to see what the server is returning exactly.

Greets,

Pavel