ID:               30538
 Updated by:       [EMAIL PROTECTED]
 Reported By:      richard at dominion-web dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         IMAP related
 Operating System: Linux
 PHP Version:      4.3.9
 New Comment:

We use the c-client function mail_fetchstructure_full() here.
If that function misbehaves like you say, report to the c-client
author. This is not PHP bug.



Previous Comments:
------------------------------------------------------------------------

[2004-10-23 14:13:49] richard at dominion-web dot com

Description:
------------
If I run an imap_fetchstructure() on POP3 on a multipart/mixed message
with a file attachment I get

object(stdClass)(12) {
  ["type"]=>
  int(1)
  ["encoding"]=>
  int(0)
  ["ifsubtype"]=>
  int(1)
  ["subtype"]=>
  string(5) "MIXED"
  ["ifdescription"]=>
  int(0)
  ["ifid"]=>
  int(0)
  ["bytes"]=>
  int(337991)
  ["ifdisposition"]=>
  int(0)
  ["ifdparameters"]=>
  int(0)
  ["ifparameters"]=>
  int(1)
  ["parameters"]=>
  array(1) {
    [0]=>
    object(stdClass)(2) {
      ["attribute"]=>
      string(8) "BOUNDARY"
      ["value"]=>
      string(41) "----=_NextPart_000_004B_01C4B881.82B4DE80"
    }
  }
  ["parts"]=>
  array(2) {
    [0]=>
    object(stdClass)(12) {
      ["type"]=>
      int(0)
      ["encoding"]=>
      int(0)
      ["ifsubtype"]=>
      int(1)
      ["subtype"]=>
      string(5) "PLAIN"
      ["ifdescription"]=>
      int(0)
      ["ifid"]=>
      int(0)
      ["lines"]=>
      int(18)
      ["bytes"]=>
      int(439)
      ["ifdisposition"]=>
      int(0)
      ["ifdparameters"]=>
      int(0)
      ["ifparameters"]=>
      int(1)
      ["parameters"]=>
      array(1) {
        [0]=>
        object(stdClass)(2) {
          ["attribute"]=>
          string(7) "CHARSET"
          ["value"]=>
          string(10) "iso-8859-1"
        }
      }
    }
    [1]=>
    object(stdClass)(13) {
      ["type"]=>
      int(5)
      ["encoding"]=>
      int(3)
      ["ifsubtype"]=>
      int(1)
      ["subtype"]=>
      string(4) "JPEG"
      ["ifdescription"]=>
      int(0)
      ["ifid"]=>
      int(0)
      ["bytes"]=>
      int(337122)
      ["ifdisposition"]=>
      int(1)
      ["disposition"]=>
      string(10) "ATTACHMENT"
      ["ifdparameters"]=>
      int(1)
      ["dparameters"]=>
      array(1) {
        [0]=>
        object(stdClass)(2) {
          ["attribute"]=>
          string(8) "FILENAME"
          ["value"]=>
          string(14) "email left.jpg"
        }
      }
      ["ifparameters"]=>
      int(1)
      ["parameters"]=>
      array(1) {
        [0]=>
        object(stdClass)(2) {
          ["attribute"]=>
          string(4) "NAME"
          ["value"]=>
          string(14) "email left.jpg"
        }
      }
    }
  }
}

If I run exactly the same code under an IMAP4 extension I get

object(stdClass)(11) {
  ["type"]=>
  int(1)
  ["encoding"]=>
  int(0)
  ["ifsubtype"]=>
  int(1)
  ["subtype"]=>
  string(5) "MIXED"
  ["ifdescription"]=>
  int(0)
  ["ifid"]=>
  int(0)
  ["ifdisposition"]=>
  int(0)
  ["ifdparameters"]=>
  int(0)
  ["ifparameters"]=>
  int(0)
  ["parameters"]=>
  object(stdClass)(0) {
  }
  ["parts"]=>
  array(1) {
    [0]=>
    object(stdClass)(12) {
      ["type"]=>
      int(0)
      ["encoding"]=>
      int(0)
      ["ifsubtype"]=>
      int(1)
      ["subtype"]=>
      string(5) "PLAIN"
      ["ifdescription"]=>
      int(0)
      ["ifid"]=>
      int(0)
      ["lines"]=>
      int(19)
      ["bytes"]=>
      int(441)
      ["ifdisposition"]=>
      int(0)
      ["ifdparameters"]=>
      int(0)
      ["ifparameters"]=>
      int(1)
      ["parameters"]=>
      array(1) {
        [0]=>
        object(stdClass)(2) {
          ["attribute"]=>
          string(7) "charset"
          ["value"]=>
          string(10) "iso-8859-1"
        }
      }
    }
  }
}

It doesn't seem to be c-client related as it seems to work connecting
to other mail servers from the same web server, however connecting to
this particular exim server produces this problem.

I am retrieving message UID's and not sequence IDs and the actual body
of the message is displayed correctly, just the attachment missing.

The email source is as follows (headers changed to protect details and
image condensed on purpose for size but I have kept the exact structure
and number of carriage returns)

Subject: Test Email Attachment.
Date: Fri, 22 Oct 2004 21:53:05 +0100
MIME-Version: 1.0
Content-Type: multipart/mixed;
        boundary="----=_NextPart_000_004B_01C4B881.82B4DE80"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Importance: Normal



This is a multi-part message in MIME format.

------=_NextPart_000_004B_01C4B881.82B4DE80
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Body of message
--------------------------------------------------------
Signature
-------------------------------------------------------- 
------=_NextPart_000_004B_01C4B881.82B4DE80
Content-Type: image/jpeg;
        name="email left.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
        filename="email left.jpg"

[snip]base64 encoded jpeg[/snip]

------=_NextPart_000_004B_01C4B881.82B4DE80--




Reproduce code:
---------------
$structure = imap_fetchstructure($mailbox, $msgid, FT_UID);

Expected result:
----------------
Retrieves body of message and one image file attachment in the
structure

Actual result:
--------------
Retrieves body of message and no image files attachments in the
structure


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30538&edit=1

Reply via email to