in reply to Yet another email question

amphiplex and Aristotle are very right--you have some major security issues to worry about here, and using a command line program instead of a mail module is neither safe nor portable.

However, I will say that there's a good chance that you don't have your permissions set correctly. It's likely that you own the file, so you can read it when you use the script at the command line, but the web server doesn't have the right permissions.