Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Intimatik  
#1 Posted : Friday, January 28, 2011 4:29:47 AM(UTC)
Intimatik

Rank: Newbie

Groups: Registered
Joined: 1/28/2011(UTC)
Posts: 5
Location: NZ

Thanks: 1 times
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.

Edited by moderator Friday, January 28, 2011 6:49:55 PM(UTC)  | Reason: better for user search the topic

ivan  
#2 Posted : Friday, January 28, 2011 6:43:34 PM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,152

Thanks: 9 times
Was thanked: 55 time(s) in 55 post(s)
Intimatik wrote:
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.


the correct syntax is:

Code:

 
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  
#3 Posted : Monday, February 7, 2011 4:17:19 AM(UTC)
Intimatik

Rank: Newbie

Groups: Registered
Joined: 1/28/2011(UTC)
Posts: 5
Location: NZ

Thanks: 1 times
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  
#4 Posted : Monday, February 7, 2011 5:29:11 PM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,152

Thanks: 9 times
Was thanked: 55 time(s) in 55 post(s)
Intimatik wrote:
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".


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

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
Code:

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



Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.056 seconds.

EXPLORE TUTORIALS

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