Zend IMAP search and filters

核能气质少年 提交于 2019-12-22 08:41:01

问题


How do i make search using filters like in gmail. Like getting list of email with specific labels or list of mails from a specific email address. I couldn't able to find it in documentations.

Note:I use oAuth for authentication. I hope this has nothing to do with search.


回答1:


The labels on Gmail are in fact (from IMAP point of view) folders, so to get all emails with label you can just list e-mails in folder of this name.

To search you could use "undocumented" function search() (see Zend/Mail/Imap/Protocol.php), but see the method comment: This method is currently marked as internal as the API might change and is not safe if you don't take precautions. So you may rather use PHP's own imap_search() function.

See also Zend Framework feature request ZF-8858.



来源:https://stackoverflow.com/questions/8894238/zend-imap-search-and-filters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!