Req #65760 [Com]: Add content-type to imap_fetch_overview()
| From: | mail at nikha dot org | Date: | Wed, 25 Sep 2013 18:10:47 +0000 |
| Subject: | Req #65760 [Com]: Add content-type to imap_fetch_overview() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-181774@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65760&edit=1
ID: 65760
Comment by: mail at nikha dot org
Reported by: mail at nikha dot org
Summary: Add content-type to imap_fetch_overview()
Status: Wont fix
Type: Feature/Change Request
Package: IMAP related
Operating System: Linux
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
to aharvey@php.net:
Sorry, that is absurd and cannot be true! If the underlying function IS
"imap_fetchstructure()", then you HAVE the type information! It's the first
property of the object, returned by imap_fetchstructure()!
simply add it to the return of the calling "imap_fetch_overview()"! Do this, and
do not close this request!!!
Thanks
Previous Comments:
------------------------------------------------------------------------
[2013-09-25 16:20:43] aharvey@php.net
This would need to be added to c-client before we could implement it â right now,
ENVELOPE structs returned from mail_fetch_structure() (which is the underlying
function) only include the properties that imap_fetch_overview() returns.
Closing for now, since this would require upstream changes. Please reopen this
request if and when those occur.
------------------------------------------------------------------------
[2013-09-25 15:55:43] mail at nikha dot org
Sorry, I mean an additional _property_ of the object, not a new object!
------------------------------------------------------------------------
[2013-09-25 15:38:03] mail at nikha dot org
Description:
------------
---
From manual page: http://www.php.net/function.imap-fetch-overview
---
this function should also return an object reflecting the values in the header
line "Content-Type:". This is as necessary for mailbox overviews as the other
lines, the function reflects: Overviews should show, whether mails have
attachments or not!
Test script:
---------------
no special code for this!
My script first calls this function. But the missing content-type object forces me later to re-fetch
the header of every mail to parse the "Content-Type:". This works, but is a considerable
overhead, that could be avoided, if it's provided by the single call of this function.
(And is really stupid, because the function must parse the mail headers anyway, why not this line
too?)
Expected result:
----------------
An additional object returned by this function, named "type" or whatever you
like, with at minmum two values: "text" or "multipart". (May also provide
subtypes like "plain", "mixed" etc, but this is less important)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65760&edit=1