use Mail::Sender; my $recipients = 'test@some.com; my $sender = new Mail::Sender {smtp => smtpsome.com'}; if ($sender->OpenMultipart({from => 'some.com', to => $recipients, subject => "Test", subtype => 'related', boundary => 'boundary-test-1', type => 'multipart/related'}) > 0) { $sender->Attach( {description => 'html body', ctype => 'text/html; charset=us-ascii', encoding => '7bit', disposition => 'NONE', file => 'finalhtml.html' }); $sender->Attach( {description => 'ed\'s gif', ctype => 'application/vnd.ms-excel', encoding => 'base64', disposition => "inline; ", file => "One.xls" }); $sender->Attach( {description => 'ed\'s gif', ctype => 'application/vnd.ms-excel', encoding => 'base64', disposition => "inline; ", file => "two.xls" }); $sender->Close(1) or die "Close failed!$Mail::Sender::Error\n"; } else { die "Cannot send mail: $Mail::Sender::Error\n"; }