php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37524 content-type format property missing
Submitted: 2006-05-19 17:14 UTC Modified: 2006-05-28 01:00 UTC
From: pons18 at yahoo dot com Assigned:
Status: No Feedback Package: IMAP related
PHP Version: 4.4.2 OS: winxp
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
20 + 33 = ?
Subscribe to this entry?

 
 [2006-05-19 17:14 UTC] pons18 at yahoo dot com
Description:
------------
if i receive an email with this content type:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

i can use imap_fetchstructure to recontruct the original email content type, but then when i use imap_mail_compose, the format property is lost


Reproduce code:
---------------
$envelope["from"] = "from@example.net";
$part["type"] = 0;
$part["subtype"] = "PLAIN";
$part["charset"] = "iso-8859-1";
$part["format"] = "flowed";
$part["contents.data"] = "text";
$body[] = $part;
$mail = imap_mail_compose($envelope, $body);
echo $mail;


Expected result:
----------------
using imap_fetchstructure, part of the returning object is
    [parameters] => Array
        (
            [0] => stdClass Object
                (
                    [attribute] => charset
                    [value] => iso-8859-1
                )
            [1] => stdClass Object
                (
                    [attribute] => format
                    [value] => flowed
                )
        )

by fetching these parameters i get information to compose the mail such as line 4 and 5 of example script.
then using imap_mail_compose it should generate a content-tpye like the one from the original mail i.e.:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Actual result:
--------------
imap_mail_compose, using php source code above generete this content-type:

Content-Type: TEXT/PLAIN; CHARSET=iso-8859-1


format=flowed is missing

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-20 14:04 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2006-05-28 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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 16:01:27 2024 UTC