php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: j-pieper at gmx dot net
New email:
PHP Version: OS:

 

 [2007-11-27 13:31 UTC] j-pieper at gmx dot net
Description:
------------
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?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-28 12:42 UTC] jani@php.net
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 http://php.net/imap_fetchstructure 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: Sun Dec 22 03:01:28 2024 UTC