function mailhandler_mailbox_stream_count in Mailhandler 6
Get number of messages in the stream connection.
Parameters
$stream: stream openned using mailhandler_mailbox_stream_open().
Return value
boolean result of closing operation
Related topics
File
- ./
mailhandler.module, line 561 - Mailhandler module code.
Code
function mailhandler_mailbox_stream_count($stream) {
$result = imap_num_msg($stream);
// Record debug information about stream closing operation.
mailhandler_watchdog_record('Messages in stream = %total : %result.', array(
'%result' => !imap_last_error(),
'%total' => $result,
), WATCHDOG_DEBUG);
return $result;
}