TASdvlper has asked for the wisdom of the Perl Monks concerning the following question:
I've found some threads on how to attach a binary file to a email, but I'm having some problems trying to figure out how to attach a xls (Excel) file. Here is the snippet of code that I'm struggling with:
if I "unpound" the 'message' key, I see the Excel output in the email itself, but it's not showing up as attached.open (XLS, $file) or die "Can't open file: $file -- $!\n"; undef $/; $message1 = (<XLS>); %emailhash = ( 'to' => "toname\@company.com", 'from' => "fromname\@company.com", 'subject' => $subject2, # 'message' => $message1, 'disposition' => $file ); sendmail(%emailhash);
Any help would be appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Sendmail and attaching a xls (Excel) file
by chas (Priest) on Apr 18, 2005 at 23:32 UTC | |
|
Re: Using Sendmail and attaching a xls (Excel) file
by zentara (Cardinal) on Apr 19, 2005 at 12:37 UTC |