#!/usr/local/bin/perl use MIME::Lite; my $str; ### Create a new multipart message: $msg = MIME::Lite->new( From =>'robert@idi.net', To =>'robert@idi.net', Cc =>'some@other.com, some@more.com', subject =>'Here is an GIF and a text file attachment for you, courtesy of MIME::Lite', # Tried all the multipart types... Type =>'multipart/digest', #Type =>'text/plain', Data =>'Included with this email is a text file and a gif.', ); ### Add parts (each "attach" has same arguments as "new") $msg->attach(Type =>'image/gif', Path =>'/home/robert/newsroom.gif', Encoding => "base64", Filename =>'newsroom.gif' ); $msg->attach(Type =>'text/html', Path =>'/home/robert/attachme.txt', Filename =>'attachme.txt' ); $msg->send("smtp");