|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2008-08-05 01:00 UTC] jani@php.net
  [2008-08-13 01:00 UTC] php-bugs at lists dot php dot net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 17:00:02 2025 UTC | 
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--