SEARCH TEXT "Joe says: "i want to search" and exits."
how can i search this text with IMAP SEARCH
this doesn't work : "Joe says: \"i want to search\" and exits."
SEARCH TEXT "Joe says: "i want to search" and exits."
how can i search this text with IMAP SEARCH
this doesn't work : "Joe says: \"i want to search\" and exits."
Since you don't say how you're searching IMAP, I can't give you a definitive answer, but could it be that you have to double-escape the quotation marks? Once for C# and once for the IMAP search?
string searchString = "Joe says: \\\"i want to search\\\" and exits.";
IMAP search does not support arbitrary string -- so no, there is no way to do this.
Hi,
searching in IMAP using C# is shown in our Rebex IMAP tutorial.
// create client, connect and log in
Imap client = new Imap();
client.Connect("server");
client.Login("username", "password");
// select the folder for search operation
client.SelectFolder("Inbox");
ImapMessageCollection fromJoe = client.Search
(
ImapSearchParameter.Body("Joe says: \"i want to search\" and exists.");
);
The component takes care of correct escaping automatically.
If you are curious how it is escaped try producing a log as shown at rebex.net/kb/logging.aspx and check the IMAP commands and responses.