imap_check

imap_check -- Prüft den Status des aktuelle Postfachs

Beschreibung

object imap_check ( int imap_stream)

Die imap_check( ) Funktion prüft den Status des aktuellen Postfach und liefert die entsprechenden Felder in einem Objekt mit folgenden Attributen zurück :



Beispiel 1 . imap_check( ) Beispiel

 
$mbox

 
=

 
imap_open

 
(

 
"{your.imap.host}INBOX"

 
,

 
"username"

 
,

 
"password"

 
)

 
|

 
|

 
die

 
("can't

 
connect

 
:

 
"

 
.

 
imap_last_error())

 
;

 
$check

 
=

 
imap_check

 
($mbox)

 
;

 
if($check

 
)

 
{

 
print

 
"Date

 
:

 
"

 
.

 
$check

 
-

 
Date

 
.

 
"

 
br

 
\n

 
"

 
;

 
print

 
"Driver

 
:

 
"

 
.

 
$check

 
-

 
Driver

 
.

 
"

 
br

 
\n

 
"

 
;

 
print

 
"Mailbox

 
:

 
"

 
.

 
$check

 
-

 
Mailbox

 
.

 
"

 
br

 
\n

 
"

 
;

 
print

 
"Messages

 
:

 
"

 
.

 
$check

 
-

 
Nmsgs

 
.

 
"

 
br

 
\n

 
"

 
;

 
print

 
"Recent

 
:

 
"

 
.

 
$check

 
-

 
Recent

 
.

 
"

 
br

 
\n

 
"

 
;

 
}

 
else

 
{

 
print

 
"imap_check(

 
)

 
failed

 
:

 
"

 
.

 
imap_last_error(

 
)

 
.

 
"

 
br

 
\n"

 
;

 
}

 
imap_close

 
($mbox)

 
;