#42240 [Opn->Fbk]: Consecutive calls to imap_mail_compose drops parameter arrays
| From: | jani@php.net | Date: | Tue, 05 Aug 2008 01:00:44 +0000 |
| Subject: | #42240 [Opn->Fbk]: Consecutive calls to imap_mail_compose drops parameter arrays | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-127595@lists.php.net to get a copy of this message | ||
ID: 42240
Updated by: jani@php.net
Reported By: php dot net dot alias at fremnet dot net
-Status: Open
+Status: Feedback
Bug Type: IMAP related
Operating System: Linux
PHP Version: 5CVS-2007-08-08 (snap)
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
Previous Comments:
------------------------------------------------------------------------
[2007-08-08 03:28:16] 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--
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42240&edit=1