Doc #74121 [NEW]: Confusion between selected mailbox and arbitrary mailboxes as folders.

From: Date: Fri, 17 Feb 2017 21:20:45 +0000
Subject: Doc #74121 [NEW]: Confusion between selected mailbox and arbitrary mailboxes as folders.
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14448@lists.php.net to get a copy of this message
From: dominic_mayers at yahoo dot com Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:Confusion between selected mailbox and arbitrary mailboxes as folders. Description: ------------ --- From manual page: http://www.php.net/function.imap-open --- My understanding of Mail technologies, MTA, MTU, POP3, IMAP, etc. is that an email (say dominic@example.com) is associated with a single mailbox, which can be at any given time associated with a single folder, say INBOX or Drafts, but only INBOX in the case of a mail delivery agent (MDA). So, INBOX, etc. are folders, not mailboxes. I know that implementations of IMAP servers and the associated RFCs, refer to these folders as mailboxes. However, Gmail, Mozilla in the context of Thunderbird, Microsoft Windows in the context of Outlook, Wikipedia in the context of email clients, etc. use the term IMAP folders when they refer to INBOX, etc. It is unfortunate that the PHP IMAP client implementation followed the naming convention used in IMAP servers and associated RFCs. So, I feel a clarification for those who expect the more natural and largely spread convention is necessary. However, there is a lot more in this documentation bug than only a naming convention. In what follows I use the PHP imap convention. 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. This is not well explained in the documentation. In fact, it seems to have it wrong. The documentation in imap_list() and perhaps elsewhere adds to the confusion. 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 bug report at https://bugs.php.net/bug.php?id=74121&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74121&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74121&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74121&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74121&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74121&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74121&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74121&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74121&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74121&r=support Expected behavior: https://bugs.php.net/fix.php?id=74121&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74121&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74121&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74121&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74121&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74121&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74121&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74121&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74121&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74121&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74121&r=mysqlcfg

« previous php.doc.bugs (#14448) next »