3
###############################################################################
5
# Example of how to use Mail::Sender to send a Spreadsheet::WriteExcel Excel
6
# file as an attachment.
8
# See the Mail::Sender module for further details.
10
# reverse('�'), August 2002, John McNamara, jmcnamara@cpan.org
15
use Spreadsheet::WriteExcel;
18
# Create an Excel file
19
my $workbook = Spreadsheet::WriteExcel->new("sendmail.xls");
20
my $worksheet = $workbook->add_worksheet;
22
$worksheet->write('A1', "Hello World!");
24
$workbook->close(); # Must close before sending
28
# Send the file. Change all variables to suit
29
my $sender = new Mail::Sender
31
smtp => '123.123.123.123',
37
to => 'another@mail.com',
38
subject => 'Excel file',
39
msg => "Here is the data.\n",