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: myplace@example.com\r\n”; $headers .= “Reply-To: myplace2@example.com\r\n”; $headers .= “Return-Path: myplace@example.com\r\n”; $headers .= “CC: sombodyelse@example.com\r\n”; $headers .= “BCC: hidden@example.com\r\n”; if ( mail($to,$subject,$message,$headers) ) { echo “The email has been sent!”; } else { echo “The email has failed!”; } ?>

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 to spamproof a mailto link?

JavaScript remains one of the best mailto obfuscator. For users with JavaScript disabled you may want to substitute the mailto link with a link to a contact form. The following is a popular JavaScript anti spam email obfuscator: http://www.jottings.com/obfuscator/ There is also a php version of the above to be able to generate obfuscated emails … Read more

Should I use the Reply-To header when sending emails as a service to others?

I tested dkarp’s solution with gmail and it was filtered to spam. Use the Reply-To header instead (or in addition, although gmail apparently doesn’t need it). Here’s how linkedin does it: Sender: messages-noreply@bounce.linkedin.com From: John Doe via LinkedIn <member@linkedin.com> Reply-To: John Doe <John.Doe@gmail.com> To: My Name <My.Name@gmail.com> Once I switched to this format, gmail is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)