Edit report at https://bugs.php.net/bug.php?id=65760&edit=1
ID: 65760 Updated by: ahar...@php.net 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: The problem is that the type returned by imap_fetchstructure() is contained in the body struct c-client returns, not the envelope â in order for imap_fetch_overview() to return the type, it would have to download the entire message rather than just the headers, which defeats the purpose of the function. As I said, we can't do anything about this in PHP â this has to be changed in c- client. Previous Comments: ------------------------------------------------------------------------ [2013-09-25 18:27:36] mail at nikha dot org Sorry again, ahar...@php.net: You mention "mail_fetch_structure()" in the c-lient, I was confusing it with "imap_fetchstructure()" from the PHP extension. Probably you are right, but try to add this damned content-type as soon as possible, it whould so extremely usefull! Thanks. ------------------------------------------------------------------------ [2013-09-25 18:10:47] mail at nikha dot org to ahar...@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 ------------------------------------------------------------------------ [2013-09-25 16:20:43] ahar...@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