php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42240 Consecutive calls to imap_mail_compose drops parameter arrays
Submitted: 2007-08-08 03:28 UTC Modified: 2008-08-13 01:00 UTC
Votes:3
Avg. Score:4.0 ± 0.8
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: php dot net dot alias at fremnet dot net Assigned: fb-req-jani (profile)
Status: No Feedback Package: IMAP related
PHP Version: 5CVS-2007-08-08 (snap) OS: Linux
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php dot net dot alias at fremnet dot net
New email:
PHP Version: OS:

 

 [2007-08-08 03:28 UTC] php dot net dot alias at fremnet dot net
Description:
------------
Consecutive calls to imap_mail_compose drops the arrays passed in parts[]

Note the missing '; name="file1.ext"' and '; filename="file1.ext"' for the second echo in the actual result.

I've tested (and had this tested) on several Linux versions and two windows versions. Before posting I built a Linux PHP from the latest snapshot.

Reproduce code:
---------------
$Envelope = array('date' => date('r'));
$Parts = array(
        array('type' => TYPEMULTIPART, 'subtype' => 'mixed'),
        array('description' => 'file1.ext',
              'type' => TYPEAPPLICATION, 'subtype' => 'octet-binary','encoding' => ENCBINARY,
              'type.parameters' => array('name' => 'file1.ext'),
              'disposition.type' => 'attachment', 'disposition' => array('filename' => 'file1.ext'),
              'contents.data' => 'the contents of file1'),
        array('type' => TYPETEXT, 'subtype' => 'PLAIN', 'contents.data' => 'Any body will do')
);
echo imap_mail_compose($Envelope, $Parts)."\n\n\n";
echo imap_mail_compose($Envelope, $Parts);


Expected result:
----------------
Date: Wed, 08 Aug 2007 13:23:36 +1000
MIME-Version: 1.0
Content-Type: MULTIPART/mixed; BOUNDARY="8323328-1804289383-1186543416=:27980"

--8323328-1804289383-1186543416=:27980
Content-Type: APPLICATION/octet-binary; name="file1.ext"
Content-Transfer-Encoding: BASE64
Content-Description: file1.ext
Content-Disposition: attachment; filename="file1.ext"

dGhlIGNvbnRlbnRzIG9mIGZpbGUx

--8323328-1804289383-1186543416=:27980
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

Any body will do
--8323328-1804289383-1186543416=:27980--



Date: Wed, 08 Aug 2007 13:23:36 +1000
MIME-Version: 1.0
Content-Type: MULTIPART/mixed; BOUNDARY="8323328-1804289383-1186543416=:27980"

--8323328-1804289383-1186543416=:27980
Content-Type: APPLICATION/octet-binary; name="file1.ext"
Content-Transfer-Encoding: BASE64
Content-Description: file1.ext
Content-Disposition: attachment; filename="file1.ext"

dGhlIGNvbnRlbnRzIG9mIGZpbGUx

--8323328-1804289383-1186543416=:27980
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

Any body will do
--8323328-1804289383-1186543416=:27980--


Actual result:
--------------
Date: Wed, 08 Aug 2007 13:24:15 +1000
MIME-Version: 1.0
Content-Type: MULTIPART/mixed; BOUNDARY="8323328-1804289383-1186543455=:27987"

--8323328-1804289383-1186543455=:27987
Content-Type: APPLICATION/octet-binary; name="file1.ext"
Content-Transfer-Encoding: BASE64
Content-Description: file1.ext
Content-Disposition: attachment; filename="file1.ext"

dGhlIGNvbnRlbnRzIG9mIGZpbGUx

--8323328-1804289383-1186543455=:27987
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

Any body will do
--8323328-1804289383-1186543455=:27987--



Date: Wed, 08 Aug 2007 13:24:15 +1000
MIME-Version: 1.0
Content-Type: MULTIPART/mixed; BOUNDARY="8323328-846930886-1186543455=:27987"

--8323328-846930886-1186543455=:27987
Content-Type: APPLICATION/octet-binary
Content-Transfer-Encoding: BASE64
Content-Description: file1.ext
Content-Disposition: attachment

dGhlIGNvbnRlbnRzIG9mIGZpbGUx

--8323328-846930886-1186543455=:27987
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

Any body will do
--8323328-846930886-1186543455=:27987--


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-13 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Oct 21 17:01:23 2020 UTC