php.net |  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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vincent1 at cegetel dot net
New email:
PHP Version: OS:

 

 [2004-03-04 17:46 UTC] vincent1 at cegetel dot net
Description:
------------
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:
---------------
<?
$stream=@imap_open("(localhost:143)","$login","$password")
$boundary = "------=".md5(uniqid(rand()));
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\r\n";
$header .= "\r\n";
$file=c:/file_name;
$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: vinvin@raouldomain.com\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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-06 13:32 UTC] iliaa@php.net
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 http://www.php.net/support.php 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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC