How to iterate through all PHP Imap Folders without opening new Connections
I'm trying to search through my entire inbox with the PHP Imap Library
, using imap_search()
I am using imap_open() to open the stream for each folder, but the issue is that servers like hotmail block you after 6 or 7 tries, so I need to be able to switch through folders without opening a new connection stream.
This is the current code I use to connect to each folder.
$server is something like$server = '{imap.gmail.com:993/ssl}INBOX';
if($connection = imap_open($server,$log开发者_运维知识库in,$password))
See imap_reopen()
Update: You may also be interested in imap_list()
精彩评论