PHP 4.0 Bug #5084 Updated: imap_mail_compose produces a SigSegv
| From: | Bug Database | Date: | Sat, 29 Jul 2000 21:04:42 +0000 |
| Subject: | PHP 4.0 Bug #5084 Updated: imap_mail_compose produces a SigSegv | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-26860@lists.php.net to get a copy of this message | ||
ID: 5084
Updated by: sniper
Reported By: hekker@netway.at
Status: Assigned
Bug Type: IMAP related
Assigned To: sniper
Comments:
I made a partial fix to this which is committed into the CVS. But there is still some bugs in this.
For now at least the script below works:
<?php
$envelope["from"]="musone@afterfive.com";
$envelope["to"]="musone@darkstar";
$envelope["cc"]="musone@edgeglobal.com";
$part1["type"]=TYPEMULTIPART;
$part1["subtype"]="mixed";
$filename="/tmp/imap.c.gz";
$fp=fopen($filename,"r");
$contents=fread($fp,filesize($filename));
fclose($fp);
$part2["type"]=TYPEAPPLICATION;
$part2["encoding"]=ENCBINARY;
$part2["subtype"]="octet-stream";
$part2["description"]=basename($filename);
$part2["contents.data"]=$contents;
$part3["type"]=TYPETEXT;
$part3["subtype"]="plain";
$part3["description"]="description3";
$part3["contents.data"]="contents.data3\n\n\n\t";
$body[1]=$part1;
$body[2]=$part2;
$body[3]=$part3;
echo nl2br(imap_mail_compose($envelope,$body));
?>
I will write some kind of documentation of this soon as possible.
--Jani
Full Bug description available at: http://bugs.php.net/?id=5084