imap_ping
Check if the IMAP stream is still active
Description
bool imap_ping(IMAP\Connection $imap
)
Parameters
-
imap
-
An IMAP\Connection instance.
Return Values
Returns true
if the stream is still alive, false
otherwise.
Examples
Example #1 imap_ping Example
<?php
$imap = imap_open("{imap.example.org}", "mailadmin", "password");
// after some sleeping
if (!imap_ping($imap)) {
// do some stuff to reconnect
}
?>