use Mail::SendEasy ; my $mail = new Mail::SendEasy( smtp => 'localhost' , user => 'foo' , pass => 123 , ) ; my $status = $mail->send( from => 'sender@foo.com' , to => 'recp@domain.foo' , subject => "MAIL Test" , msg => "The Plain Msg..." , html => "The HTML Msg..." , ) ; if (!$status) { print $mail->error ;}