in reply to seeking sendmail enlightenment

a) Have you tried Mail::Mailer

b) So you are actually running this in a cgi script - you may check your apache error log, perhaps your httpd uid doesn't have permission to execute the sendmail exe?

c) have you tried your code in a simple perl script without worrying about the webserver part? Does that work?