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
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""" )
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".
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"" )
Forum Jump
EmailArchitect Support
Email Component Development
- EASendMail SMTP Component - .NET Version
- EASendMail SMTP Component - Windows Store Apps
- EASendMail SMTP ActiveX Object
- EAGetMail POP3 & IMAP4 Component - .NET Version
- EAGetMail POP3 & IMAP4 ActiveX Object
Exchange Server and IIS SMTP Plugin
- DomanKeys/DKIM for Exchange Server and IIS SMTP
- Disclaimer and S/MIME for Exchange Server and IIS
EmailArchitect Email Server
- EmailArchitect Email Server (General)
- EmailArchitect Email Server Development
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.