but how can you make sure the security keeping from spam?
I read a scripts named PHP Form2Mail which is a open source scripts. You'd better read it , i promise you will get something more anti-spam from it.
you can download it from phpkode.com/scripts/item/php-form2mail/
but i am not sure that's the latest version, you can also search it in google

good luck