5 ** Functions for the IMAP connection
9 /** Read from the connection until we get either an OK or BAD message. **/
10 function imapReadData($connection) {
11 $read = fgets($connection, 1024);
13 while ((substr($read, strpos($read, " ") +
1, 2) != "OK") && (substr($read, strpos($read, " ") +
1, 3) != "BAD")) {
14 $data[$counter] = $read;
15 $read = fgets($connection, 1024);