When i send email using php it goes to spam folder of yahoo and gmail can anyone tell me how can i send it to inbox folder instead of spam one?
This isn't a problem with PHP. Your webhost must've been black listed by yahoo and gmail because it's sending too much spam. You need to contact yahoo/gmail about this.
dude, i have tried and tried and tried to figure this out. as the others have said, i dont think its php. i will send email with the words, viagra, mortgage, lottery, etc in it and it will shoot through. then try a legit email and straigt to spam it goes. what a mess. nothing i could do to make it straight. out going port sometimes helps.
many web hosts if you do not supply full headers will auto mark it as spam. thre is many ip checking online to check see if you are blacklisted as well. Your host can open a listening port and ping the mail servers of yahoo, msn, gmail etc to see if the ip is blacklisted.
You are most probably blacklisted. This often happens with VPS servers, apart form the fact they're just not Whitelisted instead . You should contact google formally, (as in, in writing) and ask them to un-blacklist your sevrer's IP.