The code you posted looks like it is for a module called SendMail.pm. from here http://www.tneoh.zoneit.com/perl/SendMail/ whereas the module you have installed is Mail::Sendmail. You need to rewrite your code to be like the example in Mail::Sendmail .
poj