squirrelmail/functions/imap.php
1999-11-23 03:07:24 +00:00

20 lines
527 B
PHP

<?
/**
** imap.php3
**
** Functions for the IMAP connection
**
**/
/** Read from the connection until we get either an OK or BAD message. **/
function imapReadData($connection) {
$read = fgets($connection, 1024);
$counter = 0;
while ((substr($read, strpos($read, " ") + 1, 2) != "OK") && (substr($read, strpos($read, " ") + 1, 3) != "BAD")) {
$data[$counter] = $read;
$read = fgets($connection, 1024);
$counter++;
}
return $data;
}
?>