MoFiddy has asked for the wisdom of the Perl Monks concerning the following question:
Am I missing something? Thanks for your help.sub SendEmail { my $file = shift; my $mailTo = shift; my $top = MIME::Entity->build(Type => "multipart/mixed", To => $mailTo, Subject => "test"); $top->attach(Path => $file, Type => 'application/vnd.ms-excel', Disposition => 'attachment') or die "Problem attachin +g $file: $!"; $top->smtpsend; }
Edit: Allow me to give a better description of the file that I receive. It comes to my email as an attachment and opens with Excel. The file itself has one sheet in the workbook, but no data.
If I manually ftp the file to my machine it opens with the data that I expect to be in it. The file is not that big...about 2 MB or so.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sending excel file as an attachment
by Jenda (Abbot) on Apr 12, 2011 at 19:26 UTC | |
by MoFiddy (Sexton) on Apr 12, 2011 at 19:41 UTC | |
by CountZero (Bishop) on Apr 13, 2011 at 08:31 UTC | |
by Jenda (Abbot) on Apr 13, 2011 at 11:38 UTC | |
|
Re: Sending excel file as an attachment
by Anonymous Monk on Apr 12, 2011 at 19:38 UTC | |
|
Re: Sending excel file as an attachment
by petecm99 (Pilgrim) on Apr 12, 2011 at 19:37 UTC |