use MIME::Lite; ### Create a new multipart message: $msg = MIME::Lite->new( From =>'johns@mindspring.com', To =>'peter21458@aol.com', #Cc =>'some@other.com, some@more.com', Subject =>'A test with attachment', Type =>'multipart/mixed' ); ### Add parts (each "attach" has same arguments as "new"): $msg->attach(Type =>'TEXT', Data =>"Here's the file you wanted" ); $msg->attach(Type =>'image/gif', Path =>'C:\a\backup\cursors', Filename =>'butterfly.ani' ); $text = $msg->as_string;