Hey all,

   I am trying to get MIME::Lite to attach an Excel spreadsheet created via
Spreadsheet::WriteExcel to an outgoing email and something is not working
quite right.

   Here's the code:

    my $mail = MIME::Lite->new(
             From       =>'[EMAIL PROTECTED]',
             To         =>'[EMAIL PROTECTED]',
             Subject    =>"New Report",
             Type       =>'multipart/mixed',
             Data       => $stuff,
                        );
         $mail->attach( 
                    Type        =>'application/vnd.ms-excel',
                    FH          => $file,
                    Filename    => $workbook,
                    ReadNow     => 1,
                    Disposition => 'attachment',
                      );
         $mail->send || warn "mail attempt failed: $@";

    All documentation and forums that I have Googled has said this is the way
to do this. But I get an error like this:

binmode() on unopened filehandle at usr/lib/perl5/site_perl/5.8.0/MIME/Lite.pm
line 1816.
read() on unopened filehandle at /usr/lib/perl5/site_perl/5.8.0/MIME/Lite.pm
line 1817.

    What exactly is going wrong here? Thanks in advance for any pointers and
by the way, this is my first question to the list... 

Eric











-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to