|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27499 problem with imap_append
Submitted: 2004-03-04 17:46 UTC Modified: 2004-03-06 13:32 UTC
From: vincent1 at cegetel dot net Assigned:
Status: Not a bug Package: IMAP related
PHP Version: Irrelevant OS: windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: vincent1 at cegetel dot net
New email:
PHP Version: OS:


 [2004-03-04 17:46 UTC] vincent1 at cegetel dot net
Sorry for my english

When i want to do a mail copy by imap_append, imap_append return false if the attachment(s) exceed approximately 900 Ko.
If the attachment(s) dont exceed the 900 Ko, imap_append return true.

Reproduce code:
$boundary = "------=".md5(uniqid(rand()));
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\r\n";
$header .= "\r\n";
$ouv=fopen ("$file", "rb");$lir=fread ($ouv, filesize ("$file"));fclose ($ouv);
$attachment = chunk_split(base64_encode($lir));
$msg2 .= "--$boundary\r\n";
$msg2 .= "Content-Transfer-Encoding: base64\r\n";
$msg2 .= "Content-Disposition: attachment; filename=\"$file\"\r\n";
$msg2 .= "\r\n";
$msg2 .= $attachment . "\r\n";
$msg2 .= "\r\n\r\n";
$msg3 .= "--$boundary--\r\n";
imap_append($stream,"{".$serveur_mail."}Sent Items","From: expediteur\r\n"."To:\r\n"."Subject: sujet\r\n"."$header\r\n"."$msg2\r\n"."$msg3\r\n");
imap_close ($stream);

Expected result:
Normally, imap_append would have send the message with attachement(s) in Sent Items box same when the attachment(s) exceed approximately 900 Ko

Actual result:
If the attachment(s) exceed approximately 900 Ko, imap_append not send the message in Sent Items box


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-06 13:32 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

PHP function is a simple wrapper around the imap's library 
mail_append_full() function, which appears to have the 
limitation you have mentioned. Please report this bug to 
the IMAP library developers. 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 09 09:01:27 2023 UTC