php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31646 imap_mail_compose() don't work when body[][charset] has been set
Submitted: 2005-01-21 19:27 UTC Modified: 2005-10-03 02:46 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: webmaster at alikuvkoutek dot cz Assigned: sniper (profile)
Status: Closed Package: IMAP related
PHP Version: 5CVS-2005-05-05 (dev) 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: webmaster at alikuvkoutek dot cz
New email:
PHP Version: OS:

 

 [2005-01-21 19:27 UTC] webmaster at alikuvkoutek dot cz
Description:
------------
When set $body[][charset], the imap_mail_compose() don't work. The script is terminated on that line and no output is generated.

The source code and information from phpinfo() is available over the URL (links are on the top of the page).

Reproduce code:
---------------
http://www.alikuvkoutek.cz/t.php


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-21 20:58 UTC] webmaster at alikuvkoutek dot cz
<?
  $envelope["from"]= 'joe@example.com'; 
  $envelope["return_path"]= 'joe@example.com'; 
  $envelope["custom_headers"][] = "X-Priority: 3"; 

  $body[1]["type"]=TYPETEXT; 
  $body[1]["subtype"]="plain"; 
  $body[1]["encoding"]=ENCQUOTEDPRINTABLE ; 
  $body[1]["charset"]='windows-1250';  // when removed, all is ok
  $body[1]["contents.data"]='text'; 

  $envelope = unserialize(serialize($envelope)); 
  $body = unserialize(serialize($body)); 
  echo nl2br( imap_mail_compose($envelope, $body) );
?>
<hr />
 [2005-05-08 21:48 UTC] gandie at rootshell dot cz
BACKTRACE:

#0  0xb79007d4 in free () from /lib/libc.so.6
#1  0x082e51ee in fs_give ()
#2  0x08351b47 in _IO_stdin_used ()
#3  0x00000000 in ?? ()
#4  0x00000000 in ?? ()
#5  0x0851d1a0 in ?? ()
#6  0x0882e528 in ?? ()
#7  0x0882e588 in ?? ()
#8  0x0882e520 in ?? ()
#9  0x082fe788 in mail_free_body_parameter ()
#10 0x0882e578 in ?? ()
#11 0x0851d1a0 in ?? ()
#12 0x0882e528 in ?? ()
#13 0x082fe5a2 in mail_free_body_data ()
#14 0xbfffacc4 in ?? ()
#15 0x0882e598 in ?? ()
#16 0xbfffacc0 in ?? ()
#17 0x082fe548 in mail_free_body ()
#18 0x0882e520 in ?? ()
#19 0x0882e694 in ?? ()
#20 0x0882bcbc in ?? ()
#21 0x0810cfc0 in zif_imap_mail_compose ()
#22 0x00000000 in ?? ()
(gdb) frame 21
#21 0x0810cfc0 in zif_imap_mail_compose ()
(gdb) frame 22
#22 0x00000000 in ?? ()
 [2005-06-01 02:11 UTC] martin at fronek dot slansko dot net
The Function imap_mail_compose work, but only if  the parameter "charset" is typping UPPERCASE!
doesn't working example: $body[1]["charset"]='windows-1250'; 
working example: $body[1]["CHARSET"]='windows-1250'; 

The bug is in souce code of PHP, in file 'php_imap.c' on lines 2912 and 3019.

Martin Fronek.
 [2005-06-01 02:18 UTC] martin at fronek dot slansko dot net
supplement:

Just the function imap_mail_compose work, not charset!

Unfortunately......
 [2005-06-03 23:23 UTC] sniper@php.net
Can not reproduce with latest CVS.

 [2005-10-03 02:46 UTC] webmaster at alikuvkoutek dot cz
Resolved by bug 32589 (Submitted: 5 Apr 2:59pm CEST).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 05:01:30 2024 UTC