All my emails I am sending in local WAMP or on server, with PHP mail() function, goes to SPAM folder always.
While looking for the issue, I found we've to set headers like from id, reply to, return path, mime version, char type and charset.. I have set all of them, but still email goes to SPAM folder into my Gmail / Yahoo id, any clue?
All email addresses, which I am using in from/to/replyto/return path existing in real and still it goes to SPAM, very strange !
Take a close look at the SMTP headers from the messages that are getting flagged as possible spam. Many spam filters will add a few lines listing the reasons a message was flagged; for example, if the sending IP address is blacklisted for some reason, there might be a header describing which blacklists you're listed in.