How do I create a contact form that allow me to block spams by collecting their IP address?

Thanks. in terms of the 3rd party spam filtering services, where can I find it? On the app section?