in reply to SENDMAIL problem!
Define "doesn't work".
You should avoid using a piped open to sendmail. Try using one of the many modules on CPAN that provide a simple, well tested, abstracted and portable solution, such as Net::SMTP.
If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.
In Section
Seekers of Perl Wisdom