in reply to bad email code?
There are also SMTP modules that you can use on CPAN, in fact doing a Super Search or even just a CPAN search should get you a boat load of stuff
As for being safe...using Taint as mentioned above will ensure your user input is safe (provided you apply the right guidelines when regexing the tainted data) and the security implications on SENDING mail are not that great...you may be inadvertantly doing things to the mail server, but your machine should be relatively ok sending mail.
Now that is only a simple view of it, if anonymous people are going to be using your mailer things can get a little more tricky, especially if it is a part of your web site. One of the warnings you probably saw was about FormMail.pl, a Super Search on that will show you many nodes about why earlier (and current for all I know) versions of that script were insecure.
Have a look around at some of those nodes and I'm sure enlightenment will follow.
"Nothing is sure but death and taxes" I say combine the two and its death to all taxes!