开发者

How to iterate through all PHP Imap Folders without opening new Connections

开发者 https://www.devze.com 2023-02-22 04:38 出处:网络
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 blo

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()

0

精彩评论

暂无评论...
验证码 换一张
取 消