updated IMAP patch

From: Date: Thu, 01 Jul 1999 20:53:49 +0000
Subject: updated IMAP patch
Groups: php.dev 
Request: Send a blank email to php-dev+get-7954@lists.php.net to get a copy of this message
Ok, I went ahead and did the errors as a list, because it turned out to be fairly easy. Attached is the latest version of my patches to imap.c and imap.h. They include: - the \\Draft flag is included in the flags returned by imap_header, etc. - there are two new list functions, imap_getmailboxes() and imap_getsubscribed(). These return arrays of objects, and the objects contain the name of the mailbox, the hierarchy delimiter for that part of the namespace, and the mailbox attributes. These flags are essential for figuring out anything much about mailboxes. - there is a new constant, SA_ALL, that can be passed to imap_status in order to populate all the members of the returned object. - there are now imap_errors() and imap_last_error() functions. imap_errors returns an array containing all of the errors since the page started or since imap_errors() was last called. imap_errors() clears the error stack when it's called. imap_last_error() simply returns the last error that occurred; it does NOT clear the error stack. - imap_alerts() behaves exactly like imap_errors() wrt behavior, but it acts on the alert list. Previously [ALERT] messages were not accessible from PHP; the IMAP spec requires that be passed onto the user. This function allows the script author the option of doing so. Finally, I tried to write an end_request function that would output any errors and alerts that hadn't been gotten with imap_errors/imap_alerts() (alerts at E_NOTICE level, errors at their original level), but imap_end_request() doesn't seem to get called. Is output not allowed from the end_request() function? If someone could look these over and commit them to cvs (assuming no problems), I'd really appreciate it. I'd even find the time to learn sgml and update the imap docs... ;) -chuck -- Charles Hagenbuch, <chagenbu@wso.williams.edu>

« previous php.dev (#7954) next »