php imap_search fails for subject strings which have apostrophe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux