### Create the multipart container $msg = MIME::Lite->new ( From => $from_address, To => $to_address, Cc => $to_cc, Subject => $subject, Type =>'multipart/mixed' ) or die "Error creating multipart container: $!\n"; ### Add the text message part $msg->attach ( Type => 'TEXT', Data => $message_body ) or die "Error adding the text message part: $!\n"; ### Add the xls file $msg->attach ( Type => 'application/xls', Path => $my_file_xls, Filename => $your_file_xls, Disposition => 'attachment' ) or die "Error adding $file: $!\n"; ### Send the Message MIME::Lite->send('smtp', $mail_host, Timeout=>60); $msg->send;