in reply to PERL Sendmail Problem

If you have mailx on your server, why not switch to that? Here is an example (it also calls the mailx directly, without using any perl libraries... should you not want to use these) http://www.perlmonks.org/?node_id=1128801

important: sendmail and mailx accept different parameters, so you can not drop-in replace sendmail with mailx. You need to rearrange some of the parameters...