note 61465 added to function.imap-open
| From: | admin at webes dot es | Date: | Sat, 04 Feb 2006 11:03:52 +0000 |
| Subject: | note 61465 added to function.imap-open | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-102979@lists.php.net to get a copy of this message | ||
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
----
Server IP: 217.160.72.57
Probable Submitter: 80.141.122.92
----
Manual Page -- http://www.php.net/manual/en/function.imap-open.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61465
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61465&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61465&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61465&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61465&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61465&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61465&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61465&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61465&report=yes
Search -- http://master.php.net/manage/user-notes.php