|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43425 imap_fetchstructure: Undocumented primary body type
Submitted: 2007-11-27 13:31 UTC Modified: 2007-11-28 12:42 UTC
From: j-pieper at gmx dot net Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 5.2.5 OS: CentOS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: j-pieper at gmx dot net
New email:
PHP Version: OS:


 [2007-11-27 13:31 UTC] j-pieper at gmx dot net
Documentation of imap_fetchstructure() function says that there are 8 primary body types (0-7). Today I got primary body type 9 (Content-Type: "/unknown"; base64-encoded pdf).

What means primary body type 9? Is there also an primary body type 8?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-28 12:42 UTC]
I think this depends on what c-client version you have used to compile PHP with. I downloaded the latest I could find (
#define TYPETEXT 0              /* unformatted text */
#define TYPEMULTIPART 1         /* multiple part */
#define TYPEMESSAGE 2           /* encapsulated message */
#define TYPEAPPLICATION 3       /* application data */
#define TYPEAUDIO 4             /* audio */
#define TYPEIMAGE 5             /* static image */
#define TYPEVIDEO 6             /* video */
#define TYPEMODEL 7             /* model */
#define TYPEOTHER 8             /* unknown */
#define TYPEMAX 15              /* maximum type code */

And on the manual page there is an user note containing reply from Mark:

> To allow applications to support types and encodings that are unknown
> to c-client, c-client will automatically add a (limited) number of
> unknown types and encodings to its tables before resorting to
> TYPEOTHER and ENCOTHER.  The names of these added types and encodings
> are available in the body_types[] and body_encodings[] arrays.
> Put another way, TYPEOTHER and ENCOTHER are only used if c-client is
> overflowed with unknown types and/or encodings.

There's already a FR about this, see bug #43061 (I'm closing this one in favor of that)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 00:01:28 2024 UTC