my ($msg, $to_list, $cc_list, $subject, $MailFrom, $email, $file); $MailFrom = xxx@abc.com; $email = "Test data you got"; $subject = "Test mail"; $to_list = "santhi@xx.com"; $cc_list = "santhi@xx.xom"; $file = "newfile.tar"; $msg = MIME::Lite->new( From => $MailFrom, To => $to_list, Cc => $cc_list, Subject => $subject, Type => 'TEXT', Encoding => '7bit', Data => $email ); ### Attach a part... the make the message a multipart automatically: $msg->attach(Type => 'application/x-tar', Encoding => 'base64', Path => "$file" ); $msg->send() ;