php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31142 imap_mail_compose() no longer works
Submitted: 2004-12-17 07:33 UTC Modified: 2005-01-19 00:37 UTC
Votes:16
Avg. Score:4.9 ± 0.3
Reproduced:14 of 14 (100.0%)
Same Version:6 (42.9%)
Same OS:4 (28.6%)
From: sean-freebsd at farley dot org Assigned:
Status: Closed Package: IMAP related
PHP Version: 4CVS, 5CVS (2005-01-05) OS: *
Private report: No CVE-ID: None
 [2004-12-17 07:33 UTC] sean-freebsd at farley dot org
Description:
------------
I noticed the problem after upgrading from PHP v4.3.4 to v4.3.10.  ISMail (http://www.insidesystems.net/projects/project.php?projectid=4) stopped working.  None of the headers provided in the envelope argument were being returned by the function.

I also attempted running the example code (using /etc/motd for the file in the code) from the man page for this function without success:
----begin output----
--0-1804289383-1103265027=:94095--<br />
----end output----


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-04 21:41 UTC] sean-freebsd at farley dot org
I think I need to give a better example.  While the fix in CVS does fix the example from the man page, I am having trouble when the envelope includes custom_headers.

If you add the following line to the example script in the man page, you should notice that the other headers are missing.  I tested this with a 20050104 CVS snapshot.

$envelope["custom_headers"] = array("X-Mailer: TestMailer");

Thank you for the earlier fix.  It did help.
 [2005-01-05 11:05 UTC] sniper@php.net
And also found another crash bug:

<?php
$envelope["from"]= "joe@example.com";
$envelope["to"]  = "foo@example.com";
$part1["type"] = TYPEMULTIPART;
$body[] = $part1;
echo imap_mail_compose($envelope, $body);
?>

#0  0x082ec3af in rfc822_encode_body_7bit ()
#1  0x081275fe in zif_imap_mail_compose (ht=2, return_value=0x86763a4, this_ptr=0x0, 
    return_value_used=1) at /usr/src/web/php/php_4_3/ext/imap/php_imap.c:3081

 [2005-01-18 22:56 UTC] sniper@php.net
Test script for the missing headers with custom_headers:

<?php

$envelope["from"]= "joe@example.com";
$envelope["to"]  = "foo@example.com";
$envelope["cc"]  = "bar@example.com";
$envelope["custom_headers"] = array("X-Mailer: TestMailer");

$part["type"] = TYPETEXT;
$part["subtype"] = "plain";
$part["description"] = "description";
$part["contents.data"] = "contents.data";

echo imap_mail_compose($envelope, array($part));

?>

 [2005-01-19 00:37 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 03:01:29 2024 UTC