use Mail::SendEasy ; my $status = Mail::SendEasy::send( smtp => 'localhost' , user => 'foo' , pass => 123 , from => 'sender@foo.com' , to => 'recp@domain.foo' , cc => 'recpcopy@domain.foo' , subject => "MAIL Test" , msg => "The Plain Msg..." , html => "The HTML Msg..." , anex => ['/tmp/file1' , '/tmp/file2'] , ) ; if (!$status) { Mail::SendEasy::error ;}