vivekanandch Posted August 24, 2011 Share Posted August 24, 2011 i am using mail functions in php and i am sending mails but the mails are going to spam in gmail and for yahoo its going to inbox. my problem is i want to send the email to inbox only as most of them use gmail ....should i use any smtp or any other mail library functions? can anyone guide me? Quote Link to comment https://forums.phpfreaks.com/topic/245603-php-email-sent-to-gmail-is-a-spam/ Share on other sites More sharing options...
Psycho Posted August 24, 2011 Share Posted August 24, 2011 The reasons for email ending up in spam are many. In the end, you can exhaust every available option, setting, etc. and still have your email flagged as spam. If it were easy to ensure your email didn't end up in spam, all the spammers would do that. With that said, there are some things you can do to reduce the chance of your email being flagged as spam. I am by no means an expert in this, but I have experienced this with an enterprise class application and had to interface with many teams to resolve. There were several issues encountered. Here are some things you can look into: 1. Setting the appropriate headers for the email 2. Avoiding attachments (especially exe) 3. Use an appropriate FROM address. Preferably, the SMTP server you are sending the email from should be the "approved" email server for the domain of that email address. I.e. if you are sending from [email protected], then the SMTP server should be the approved one to send email for mydomain.com. Some email servers will check incoming email and do a reverse lookup on the from email address and the server that sent the email. Although I doubt this is your problem as I know this isn't the case with gmail 4. Check your content. Make sure it isn't to "brief" and doesn't have all caps, or certain words that may be typical of spam. Also, different email servers use different methods of detecting spam. Part of that process is using "black list" of servers that have been deemed spammers. Even though YOU may not be sending spam another user that uses the same provider as you may have and caused your providers email server to be added to a black list used by one server and not another. This "should be rare as providers do not want their email servers to be black-listed and will kick users that abuse the system. Quote Link to comment https://forums.phpfreaks.com/topic/245603-php-email-sent-to-gmail-is-a-spam/#findComment-1261457 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.