Intimatik
  • Intimatik
  • 53.75% (Neutral)
  • Newbie Topic Starter
14 years ago
We've got clients with multiple e-mail addresses , like : favouriteclient@yahoo.com and thebestclient@gmail.com. I'm trying to search all the mails from them.
So i'm trying to use searchmail method with "or" argument

oClient.SearchMail("ALL TEXT favouriteclient OR ALL TEXT thebestclient").

BUT THIS DOESN'T WORK! The number of messages it returns is always the same oClient.SearchMail("ALL TEXT favouriteclient OR ALL TEXT thebestclient") returns 44 and (oClient.SearchMail("ALL TEXT favouriteclient") returns the same number.
ivan
  • ivan
  • 100% (Exalted)
  • Administration
14 years ago

We've got clients with multiple e-mail addresses , like : favouriteclient@yahoo.com and thebestclient@gmail.com. I'm trying to search all the mails from them. So i'm trying to use searchmail method with "or" argument (oClient.SearchMail("ALL TEXT favouriteclient OR ALL TEXT thebestclient"). BUT THIS DOESN'T WORK! The number of messages it returns is always the same oClient.SearchMail("ALL TEXT favouriteclient OR ALL TEXT thebestclient") returns 44 and (oClient.SearchMail("ALL TEXT favouriteclient") returns the same number.

Intimatik wrote:



the correct syntax is:


 
C# 
oClient.SearchMail( "ALL OR FROM \"favouriteclient@yahoo.com\" FROM \"thebestclient@gmail.com\"" );
 
VB
oClient.SearchMail( "ALL OR FROM ""favouriteclient@yahoo.com"" FROM ""thebestclient@gmail.com""" )

Intimatik
  • Intimatik
  • 53.75% (Neutral)
  • Newbie Topic Starter
14 years ago
Thanks for the answer!


Few other questions:

Using "OR" more than twice: I'm going to use something like this oClient.SearchMail( "ALL OR FROM ""favouriteclient@yahoo.com"" FROM ""thebestclient@gmail.com"" FROM ""superclient@gmail.com""") , but the third "OR"-argument works incorrectly. What am i doing wrong?

Second question : Is it any possibility to search not for the mailaddress description, but for direct mail?
In example : oClient.SearchMail( "ALL FROM ""favouriteclient@yahoo.com""") gives me nothing because in all incoming mail his address is "J.Hooker".
ivan
  • ivan
  • 100% (Exalted)
  • Administration
14 years ago

Thanks for the answer!


Few other questions:

Using "OR" more than twice: I'm going to use something like this oClient.SearchMail( "ALL OR FROM ""favouriteclient@yahoo.com"" FROM ""thebestclient@gmail.com"" FROM ""superclient@gmail.com""") , but the third "OR"-argument works incorrectly. What am i doing wrong?

Second question : Is it any possibility to search not for the mailaddress description, but for direct mail?
In example : oClient.SearchMail( "ALL FROM ""favouriteclient@yahoo.com""") gives me nothing because in all incoming mail his address is "J.Hooker".

Intimatik wrote:



Hi, in IMAP4 protocol, OR only supports two parameters, if you want to use more, please use the following syntax

oClient.SearchMail( "ALL OR FROM ""favouriteclient@yahoo.com"" (OR FROM ""thebestclient@gmail.com"" FROM ""superclient@gmail.com"")")

Basically, IMAP4 server should search both mail address and description, it seems that your IMAP4 doesn't support it.
you can try the following code

oClient.SearchMail( "ALL HEADER ""From"" ""favouriteclient@yahoo.com"" )


Users browsing this topic

    EXPLORE TUTORIALS

    © All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.