If what you want to do is send mail, then a good way of doing this (for me, YMMVOC) is the Net::SMTP module. This allows your script to make a real SMTP connection to either the local machine or another mail server.
This has the benefits of:
- You don't need to be co-located with a mail server (but you can be)
- You are independent of platform or installed mail server software (OK, so most Unixlike SMTP MTAs offer a sendmail-like interface, but why not use the protocol?). It doesn't matter if you are talking to an NT box running Exchange or a Unix MTA.
- You can specify cool, useful ESMTP options (ask for a delivery report, etc).
Its easy to use too.