[imp] RE: error sending attached file

Thiago Faria de Andrade thiago@rezendesistemas.com.br
Mon, 27 May 2002 15:01:55 -0300


The file I'm trying to send has: 2833,53 KB.
First message error: "There was an error sending your message"
Using IMP version: 3.0



Second error messages:


Warning: fopen("/tmp/impattqc4fF6","rb") - File or directory not 
found in /www/domains/mysite.com.br/horde/imp/compose.php on line 236

Warning: stat failed for /tmp/impattqc4fF6 (errno=2 - File or 
directory not found) 
in /www/domains/mysite.com.br/horde/imp/compose.php on line 237

Warning: Supplied argument is not a valid File-Handle resource 
in /www/domains/mysite.com.br/horde/imp/compose.php on line 237

Warning: Supplied argument is not a valid File-Handle resource 
in /www/domains/mysite.com.br/horde/imp/compose.php on line 238

Warning: Unlink failed (File or directory not found) 
in /www/domains/mysite.com.br/horde/imp/compose.php on line 239

Warning: Cannot add header information - headers already sent by 
(output started 
at /www/domains/mysite.com.br/horde/imp/compose.php:236) 
in /www/domains/mysite.com.br/horde/imp/compose.php on line 801
 




----- Mensagem encaminhada de Thiago Faria de Andrade 
<thiago@rezendesistemas.com.br> -----
    Data: Mon, 27 May 2002 10:40:24 -0300
      De: Thiago Faria de Andrade <thiago@rezendesistemas.com.br>
Reponder para: Thiago Faria de Andrade <thiago@rezendesistemas.com.br>
 Assunto: error sending attached file
    Para: imp@lists.horde.org

Hi all,

When I send a file with more than 2 MB (I noted this... not a exact 
value) I get a error "There was an error sending your message"... 
then I try to send again, I don't attach the file again... and I get 
errors on the lines marked with ***


        for ($i = 0; $i < count($HTTP_POST_VARS['attachments_name']); 
$i++) {
            /* Read it from the filesystem if it's a normal
               attachment, and then delete the temp file. */
            if (!preg_match('|.*-(.*).mime$|', $HTTP_POST_VARS
['attachments_file'][$i], $regs)) {
                $filename = tempFilePath($HTTP_POST_VARS
['attachments_file'][$i]);
      ***          $fd = fopen($filename, 'rb');
      ***          $contents = fread($fd, filesize($filename));
      ***          fclose($fd);
      ***          unlink($filename);
            } else {
                /* Fetch it from the mail message content if it's a
                 * forwarded attachment. */
                $ref = $regs[1];
                $fmime = $attachments[$ref];
                $contents = IMP::getDecodedPart($fmime);
            }



I think the temporary file is being removed after the first error... 
but I have no ideia why the first error message.


[]'s


Thiago Faria
_____________________________________________________________________
Plight Sistemas - http://www.plight.com.br