note 36971 rejected from function.imap-header by didou
| From: | didou@php.net | Date: | Wed, 29 Oct 2003 12:26:36 +0000 |
| Subject: | note 36971 rejected from function.imap-header by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59468@lists.php.net to get a copy of this message | ||
Note Submitter: des@otec.ru
----
I have problem:
PHP 4.3.1
Imap2001
<php>
1.$mbox = imap_open ($mhost, $params["mailuser"],
$params["mailpass"],CL_EXPUNGE);
2.$status = imap_status($mbox,$mhost."INBOX",SA_ALL);
3.$num=$status->messages;
4.$h_struct=imap_header($mbox,$num);
5.var_dump($h_struct);
</php>
Output:
PHP Warning: imap_header(): Bad message number in todb.php on line 2
bool(false)
var_dump($status) output:
object(stdClass)(6) {
["flags"]=>
int(31)
["messages"]=>
int(2)
["recent"]=>
int(0)
["unseen"]=>
int(2)
["uidnext"]=>
int(3)
["uidvalidity"]=>
int(1067253755)
}