in reply to Security of Mail Script

I suggest you also have a look at nms-cgi's FormMail. It does what you propose and has some other nice features :) http://nms-cgi.sourceforge.net/