I have a mod_perl app where I try to send mail via MIME::Entity, so that I
can add attachments. To handle the file upload, I use Apache::Request, but
I always get this error:

read-open image.jpg: No such file or directory at
/usr/local/lib/perl5/site_perl/5.005/MIME/Body.pm line 407.

The code snippet for adding attachments goes like this:

my $r = shift;
my $apr = Apache::Request->new($r);
# ...
if ($apr->param("file")) {
        my $upload = $apr->upload;
        $mail->attach(Path => $upload->filename,
                     Type => $upload->type,
                     Encoding => '-SUGGEST');
}

($mail is a MIME::Entity ref.)
$upload->filename contains "image.jpg".
Sending mail without attachments works. 

Anyone had this problem before?

-- 
"Shit doesn't happen; shit is."
        -- anonymous

Reply via email to