MySQL 5.7 has a lot of new features. If you've dabbled with an older version of MySQL, it is definitely worth learning.
my $filename = "pos_" . $date . ".xls"; my $excel_file = "/path/to/" . $filename; my $workbook = Spreadsheet::WriteExcel->new("$excel_file"); $workbook = &createLimitSheet($workbook); $text = "see attached excel file."; my $msg = MIME::Lite->new( From => 'firstname.lastname@example.org', To => 'email@example.com', Subject => 'Excel File', Type => 'text/html', Data => "$text", ); my $att = MIME::Lite->new( Path => $excel_file, Type => 'application/vnd.ms-excel', Encoding => 'base64', Disposition => 'attachment', ); $att->attr( 'Content-Description' => $filename ); $att->delete( 'Date' ); $att->delete( 'X-Mailer' ); $att->delete( 'MIME-Version' ); $msg->attach( $att ); $msg->send('smtp', 'ip.address.of.SMTPserver', Timout => 20);
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.