note 61465 deleted from function.imap-open by didou
| From: | didou@php.net | Date: | Sat, 29 Dec 2007 21:01:28 +0000 |
| Subject: | note 61465 deleted from function.imap-open by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134227@lists.php.net to get a copy of this message | ||
Note Submitter: admin at webes dot es
----
Just a note concerning "empty mailbox" error in case it helps somebody out there.
whenever the mailbox was empty, I kept on getting errors of the type "Warning:
imap_header()..." as there were no messages to read headers of.
Reading through here I sussed that the first entry in "imap_errors()" gives you a clear
"Mailbox is empty" if this is the case.
Knowing this, I can now code for not continuing with headers, etc if the mailbox is empty, something
like:
$foo = imap_errors();
if($foo[0] !== "Mailbox is empty"){check headeres etc... };
Cheers