use MIME::Lite; ### Create a new multipart message: $msg = MIME::Lite->new( From =>'autoscript@my.com', To =>'me@my.com', Subject =>'Credit Limit Increase (D & M)', Type =>'multipart/mixed' ); ### Add parts $msg->attach(Type =>'TEXT', Data =>"Tom,\nhere are the Credit Limit Reports." ); foreach my $attach (@attach) { next unless ( -e $attach); $msg->attach(Type =>'application/vnd.ms-excel', Path => $attach, Filename => $attach, Disposition => 'attachment' ); } MIME::Lite->send('smtp', "smtp.my.com", Timeout=>60); $msg->send;