Re: php imap_search fails for subject strings which have apostrophe
| From: | nitesh nandy | Date: | Sat, 23 Oct 2010 04:59:00 +0000 |
| Subject: | Re: php imap_search fails for subject strings which have apostrophe | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-309033@lists.php.net to get a copy of this message | ||
Thanks for the reply. I had posted this on gmail forums and someone just
posted this is a server-side limitation actually.
http://www.google.com/support/forum/p/gmail/thread?fid=05fef86a09eb199d00049338b3282f61&hl=en
I guess I'll have to figure out other ways ways to make this happen
On Sat, Oct 23, 2010 at 4:16 AM, Govinda <govinda.webdnatalk@gmail.com>wrote:
> I've to search for messages from Gmail Inbox over IMAP using search by
>> SUBJECT . The php-imap imap_search() works fine when the subject is pure
>> alphanumeric. If the subject string has an apostrophe or a dash then the
>> search fails.
>>
>> imap_seach($mbox, 'ALL SUBJECT "<search string>"');
>>
>> imap_seach($mbox, 'ALL SUBJECT "this is a string without quote"');
>> //Works
>> imap_seach($mbox, 'ALL SUBJECT "this is a string with quote's and
>> da-sh"');
>> //Doesn't Work
>>
>> I've tried using the Zend Framework IMAP library too, it fails too. I've
>> been talking to people over some forums, they say subject search via imap
>> on
>> gmail works for them.
>>
>> What can be the problem here? I've tried escaping them but it did not
>> help.
>>
>> Any help is appreciated.
>>
>> --
>> Regards,
>>
>> Nitesh Nandy
>>
>
>
> Hi Nitesh,
>
> I am a newbie in PHP, but I would guess the way you are attempting to
> escape the non-alphanumeric chars is faulty.
> Can you please show the code you are using to do the escaping?
>
> ------------
> Govinda
>
>
--
Regards,
Nitesh Nandy