tags:

views:

489

answers:

2

I have read through all PHP documentation on IMAP functions (www.php.net/imap), but didn't find anything on issueing an IDLE command over an IMAP connection.

I want to establish an IMAP connection between my server and GMail, and be notified instantly that a new message has arrived. It's kind of GMail PUSH to my server. The way mobile devices are doing it is by connecting through IMAP and sending the IDLE command.

But didn't find a word on IDLE in PHP-IMAP. Is it supported?

+1  A: 

IDLE isn't supported by PHP's IMAP functions.

The documentation suggests using imap_ping for a periodic "new mail check"

Luke Antins
+1  A: 

I've been working on modifying the ilohamail.org imap client to support the IDLE extension. My application however will be running with php cli and not through a web server. I can post the code when / if I have a working version.

You may want to use the http://roundcube.net imap library which is just modified from the ilohamail library.