Side comment 1: You should keep in mind that any auto-mailing CGI script is potentially abusable by immoral people for spamming other people. Obscurity is not a solution here - a colleague of mine caused the security folks around here to get into a tizzy because he naively set up such a site and it got abused by spammers.
If I use "from = NoReply@...." which is non-existing address, will it protect from spammers?
You have created four new threads in the last 28 hours asking how to .... Do you truly believe that each of these questions has been sufficiently distinct that they warrant separate discussion
Yes, because if I new how to program it I would not ask. The forum helped me a lot and within these 28 hours I learned a lot from both forum and other sources. I guess this is what forums are for.