Forum Moderators: coopster
Here's a good library thread about mail() header injection attacks [webmasterworld.com]. :)
You should never, EVER allow the end user to specify the destination address. ALWAYS defer the addressing of the message until it is into the sending code (don't use hidden fields).
You also have to be careful about them inserting headers into the subject and body. That's a pretty common trick.
Filter your subject lines and body text for some header keywords, like "to:", "cc:" "from:", etc. Note the colons.
On my site, if you try this, you get a "tastes like spam" message.
Of course, there are always things like captcha.