Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19130 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46116 invoked by uid 1010); 22 Sep 2005 16:22:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 46100 invoked from network); 22 Sep 2005 16:22:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2005 16:22:08 -0000 X-Host-Fingerprint: 69.12.155.130 69-12-155-130.dsl.static.sonic.net Linux 2.4/2.6 Received: from ([69.12.155.130:1470] helo=pigeon.alphaweb.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id E6/2B-24510-F2AD2334 for ; Thu, 22 Sep 2005 12:22:08 -0400 Received: from localhost ([127.0.0.1] helo=peiscg33m) by pigeon.alphaweb.net with smtp (Exim 4.10) id 1EIT9e-0001sa-00; Thu, 22 Sep 2005 08:38:34 -0700 Message-ID: <002b01c5bf91$c4d2f550$5c8be5a9@ohr.berkeley.edu> Reply-To: "Sara Golemon" To: "Michael Wallner" Cc: References: <79.1A.24510.546D2334@pb1.pair.com> Date: Thu, 22 Sep 2005 09:21:13 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Subject: Re: [PATCH] imap_savebody() From: pollita@php.net ("Sara Golemon") > #define GETS_FETCH_SIZE 2048000 > That size doesn't seem a bit excessive to you? I thought the whole point of dumping it to a file was to avoid huge memory chunks. Not to mention the fact that reserving 2MB of stack space makes me a little twitchy... > /* {{{ proto bool imap_savebody(resource stream_id, > string file, int msg_no, string section[, int options]) > I'd make section option with the default being whatever it is that just gives you the whole body. Come to that it probably makes sense to be able to save the entire message (including headers). I'd also suggest either a second function, or an overloaded second parameter so that an existing stream could be used. This way a scripter could shuttle multiple messages off to a spool file, or open one for appending and add a message, or dump it to network socket (maybe they're implementing their own POP3=>IMAP gateway (god only knows why). -Sara