Blocking comment spam without using captcha [closed]

In my experience the currently most effective methods are honeypot input fields that are made invisible to users via CSS (best use several different methods, such as visibility:hidden, setting a size of 0 pixels, and absolute positioning far outside the browser window); if they’re filled anyway you can assume it’s a spambot. This blog describes … Read more

How do I prevent mails sent through PHP mail() from going to spam? [duplicate]

You must to add a needle headers: Sample code : $headers = “From:\r\n”; $headers .= “Reply-To:\r\n”; $headers .= “Return-Path:\r\n”; $headers .= “CC:\r\n”; $headers .= “BCC:\r\n”; if ( mail($to,$subject,$message,$headers) ) { echo “The email has been sent!”; } else { echo “The email has failed!”; } ?>