Imap search parameter including quotes doesn't work

0 votes
asked Nov 25, 2016 by pilouk (520 points)

I'm trying to filter some messages by searching for example with this value : id="1122" Note quotes must be included

Here my email :

    <?xml version="1.0" encoding="UTF-8" ?>
  <prospect status="new">
    <vendor id="1122">
      <vendorname>TEST VENDOR</vendorname>

The search return 0 email, however if only limit the search to 1122
the email is found.

What must i do to include the quotes in search ??

Applies to: Rebex Secure Mail

1 Answer

0 votes
answered Nov 28, 2016 by Lukas Matyska (59,530 points)

To include quotes, just include them in the input string. Like this:





However, please note that it depends on the IMAP server how it will interpret the parameter.

For example Gmail searches only for whole words in subject. E.g. Gmail matches "VENDOR" but not "VEND".

commented Nov 29, 2016 by pilouk (520 points)
edited Nov 29, 2016 by pilouk
I search the body with this New ImapSearchParameter() {ImapSearchParameter.Body("id=""1122""")}  but none is found is there a way to see what actually is searching ??
commented Nov 29, 2016 by Lukas Matyska (59,530 points)
You can create VERBOSE log of the communication to see, what requests are sent to server and what responses are received.
Follow and specify LogLevel.Verbose