Doc #74122 [Opn]: Incorrect and too restrictive description of the arguments of imap_list, etc.
| From: | dominic_mayers at yahoo dot com | Date: | Sun, 19 Feb 2017 00:07:36 +0000 |
| Subject: | Doc #74122 [Opn]: Incorrect and too restrictive description of the arguments of imap_list, etc. | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14452@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74122&edit=1
ID: 74122
User updated by: dominic_mayers at yahoo dot com
Reported by: dominic_mayers at yahoo dot com
-Summary: Incorrect and too restrisctive description of the
arguments of imap_list, etc.
+Summary: Incorrect and too restrictive description of the
arguments of imap_list, etc.
Status: Open
Type: Documentation Problem
Package: IMAP related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Typo in description
Previous Comments:
------------------------------------------------------------------------
[2017-02-17 23:53:11] dominic_mayers at yahoo dot com
Description:
------------
---
From manual page: http://www.php.net/function.imap-list
---
An email or mailbox stream can be associated with a different selected mailbox at any given time.
This is a fundamental concept in the understanding of an IMAP client. When we call imap_open, we do
not open a mailbox (folder), but an entire mailbox stream with its associated hierarchy of mailboxes
and we also select the current mailbox at the same time. So, imap_open() does two things: open a
mailbox stream and select the current mailbox. We can change the selected mailbox with
imap_reopen(). This is not well explained in the documentation.
In fact, it seems to have it wrong. The function imap_list() takes two arguments (+ a third for a
pattern) : the first is the mailbox stream and the second is a mailbox in the hierarchy, **which
does not have to be the selected mailbox.** This makes sense because this function does not need the
details of the selected mailbox, so it ignores it. There are many other imap functions that ignores
the selected folder for the same reason. The documentation in imap_list() and perhaps in other
similar functions is wrong and fails to convey this basic understanding because it says explicitly
that the second argument should normally be the selected folder given in imap_open(). This misses
the basic point. It's a fundamental misunderstanding.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74122&edit=1